Task #370: 한글 세리프 폴백 체인 개선 — macOS/Linux 볼드 표시 문제 해소#371
Closed
planet6897 wants to merge 2 commits into
Closed
Conversation
form-002.hwpx 10쪽 등에서 볼드 지정 한글 문구가 표시되지 않던 문제 해소. SVG 출력은 정상이나, 폴백 체인의 모든 한글 세리프 패밀리가 표준 리눅스 환경에 미설치되어 generic serif → 자동 한글 폴백 경로로 떨어지면서 일부 렌더러에서 bold variant 매칭 실패. 시스템에 설치된 Noto Serif CJK KR(Bold 포함)을 체인에 추가. - generic_fallback 의 한글/영문 세리프 분기 두 곳에 'Noto Serif CJK KR' 추가 - test_generic_fallback 기대 문자열 갱신 - 골든 스냅샷 3건 갱신 (폰트 체인 문자열 변경분만) closes edwardkim#370
v1(Noto Serif CJK KR 추가) 후 macOS Chrome 환경에서 여전히 볼드 미표시. 원인: 폴백 체인이 AppleMyungjo(macOS 기본 설치, Regular only)에서 매칭 종료되어 뒤에 있는 Noto Serif CJK KR에 도달하지 못함. Chrome on macOS는 CJK 글리프에 대해 font-weight 합성을 잘 수행하지 않음. Nanum Myeongjo (macOS 10.9+ 기본 설치, Bold variant 보유)를 AppleMyungjo 앞에 삽입하여 macOS에서 진짜 Bold 매칭 성공. - generic_fallback 한글/영문 세리프 분기 두 곳에 'Nanum Myeongjo' 추가 - test_generic_fallback 기대 문자열 갱신 - 골든 스냅샷 3건 갱신 refs edwardkim#370
edwardkim
added a commit
that referenced
this pull request
Apr 27, 2026
PR #371 (Task #370): 한글 세리프 폴백 체인에 Nanum Myeongjo + Noto Serif CJK KR 추가. form-002.hwpx 10쪽 한글 볼드 미표시 정정. 처리 방식: 정상 머지 (cherry-pick 으로 작성자 attribution 보존). 검증: 1014 lib + 6 svg_snapshot + 2 page_number 통과, 모든 샘플 회귀 0, form-002 폰트 체인 정상 적용 확인. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
Apr 27, 2026
PR #371 (@planet6897) 처리 완료 보고서. cherry-pick 머지로 작성자 attribution 보존. 1014 lib + 6 svg_snapshot 통과, 모든 샘플 회귀 0, form-002 SVG 폰트 체인 적용 확인. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
Apr 27, 2026
generic_fallback 의 한글/영문 세리프 분기에 Nanum Myeongjo + Noto Serif CJK KR 추가. form-002.hwpx 10쪽 한글 볼드 미표시 정정. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
한글 세리프 폴백 체인 변경 PR 검토했습니다. 진단 (SVG font-weight 정상 + 환경별 폰트 매칭 한계) 정확하고, Nanum Myeongjo / Noto Serif CJK KR 추가의 영향 범위 평가도 적절합니다. cherry-pick 으로 머지했습니다 (작성자 attribution 보존). 검증: cargo test --lib 1014 passed, svg_snapshot 6/6, 모든 샘플 회귀 0, form-002 SVG 폰트 체인 적용 확인. 상세: `mydocs/pr/pr_371_report.md` |
Owner
|
cherry-pick 으로 devel 에 머지 완료. 상세는 위 댓글 + mydocs/pr/pr_371_report.md 참고. |
This was referenced Apr 27, 2026
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.
배경
form-002.hwpx10쪽 등에서 볼드로 지정된 한글 문구(예: (기술적 측면), (시장적 측면), (정책·사회적 측면), 연구개발기간, 정부지원연구개발비, 주관연구개발기관, 정부납부기술료 등)가 SVG 출력에서 볼드로 표시되지 않는 문제가 보고됨.원인 분석
SVG 출력 자체는 정상 — 해당
<text>요소에font-weight="bold"속성이 정확히 부여됨. 문제는 한글 세리프 폴백 체인:serif→ 자동 한글 폴백 경로에서 일부 SVG/PDF 렌더러가 bold variant 매칭 실패.AppleMyungjo가 기본 설치되어 매칭 종료. AppleMyungjo는 Regular variant만 보유하며, Chrome on macOS는 CJK 글리프에 대해 font-weight 합성을 거의 수행하지 않음 → Regular로 그려짐.변경 내용
src/renderer/mod.rs의generic_fallback()한글/영문 세리프 분기 두 곳의 폴백 체인을 다음과 같이 변경:'Nanum Myeongjo''AppleMyungjo'앞'Noto Serif CJK KR''Noto Serif KR'뒤,serif앞noto-cjk패키지)의 한글 세리프. Bold variant 보유영향 범위
Batang이 우선 매칭 — 변경 없음.Noto Serif CJK KR로 떨어짐.generic_fallback공유 → 동일한 개선 적용.pdf.rs:add_font_fallbacks) 사용 → 본 변경 영향 없음.검증
cargo test: 1055 passed, 0 failedtests/golden_svg/form-002/page-0.svgtests/golden_svg/issue-157/page-1.svgtests/golden_svg/issue-267/ktx-toc-page.svgrhwp export-svg samples/hwpx/form-002.hwpx -p 9출력 SVG에 신규 체인 적용 확인관련 문서
mydocs/plans/task_m100_370.mdmydocs/plans/task_m100_370_impl.mdmydocs/working/task_m100_370_stage{1,2}.mdmydocs/report/task_m100_370_report.mdmydocs/report/task_m100_370_v2.mdcloses #370