기능: convert에 --font-dir 플래그 추가 — PDF 변환 외부 폰트 CLI 제어 - #22
Merged
Conversation
render/diff/mcp에만 있던 --font-dir가 convert(PDF)에는 없어 HWP_FONT_DIR 환경변수로만 폰트를 지정할 수 있던 비대칭 해소. - Convert 명령에 --font-dir <FONT_DIR> 추가 (반복 가능, pdf 전용 표기) - convert::run에 font_dirs 관통: 확장자 .pdf 추론 시 render 위임 경로 (기존 Vec::new() 하드코딩)와 명시적 --to pdf 팔 모두 - 미지정 시 기존 HWP_FONT_DIR → fonts/ 폴백 유지 (하위 호환) - write_by_ext(edit/new/MCP 저장 공용)의 PDF 경로는 범위 밖 — 기존 동작 유지 - cli-reference.md 드리프트 게이트 bless로 재생성 - clippy too_many_arguments는 edit/diff 관례대로 #[allow] 처리 검증: 격리 테스트로 플래그 유무 대조 — fonts/ 없는 CWD에서 미지정 시 시스템 폰트 대체(함초롬바탕→AppleMyungjo), --font-dir 지정 시 글꼴 일치. 확장자 추론·--to pdf 두 경로 모두 확인. scripts/check.sh 통과. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
render/diff/mcp에는 있던
--font-dir가convert(PDF 출력)에는 없어HWP_FONT_DIR환경변수로만 외부 폰트를 지정할 수 있던 비대칭을 해소한다.convert에--font-dir <FONT_DIR>추가 — 반복 지정 가능. help 표기는 md 전용 옵션들의(md)관례에 맞춘(pdf)접두..pdf추론 시 render 위임 경로(기존Vec::new()하드코딩 제거), ② 명시적--to pdfmatch 팔(pdf_render_opts(font_dirs)).HWP_FONT_DIR→fonts/폴백(resolve_font_dirs).write_by_ext(edit/new/MCP 저장 공용)의 PDF 경로는 기존 환경변수 기본값 유지. 호출처 4곳 관통은 별도 작업.docs/manual/cli-reference.md는 드리프트 게이트 bless(HWP_UPDATE_DOCS=1 cargo test -p hwp-cli --test cli_reference)로 재생성.too_many_arguments(8/7)는 동급 명령 핸들러(edit·diff) 관례대로#[allow]처리.검증
scripts/check.sh통과 (fmt / clippy-D warnings/ test 전체).fonts/없는 CWD +HWP_FONT_DIR미설정에서 플래그 유무 대조:함초롬바탕 → AppleMyungjo시스템 폰트 대체, PDF 136,561B--font-dir <외부 디렉터리>:글꼴 일치: 함초롬바탕/돋움, PDF 123,990B (임베드 폰트 상이)--to pdf두 경로 모두 동일하게 확인.🤖 Generated with Claude Code