[DET-33] 나눔스퀘어 미지원 폰트 대응 (Pretendard)#164
Merged
Merged
Conversation
NanumSquareRound 미지원 한글 음절(힣, 팉 등) 입력 시 TextInput에서 글자가 사라지는 현상을 해결하기 위한 도구. 사용법: python scripts/merge-fonts.py 사전 준비: pip install fonttools, scripts/pretendard/에 Pretendard .ttf 배치 Confidence: medium Scope-risk: narrow Not-tested: 실제 폰트 병합 결과물 앱 번들링 및 렌더링 검증 필요
Confidence: high Scope-risk: narrow
This reverts commit 343180c.
NanumSquare는 11172개 한국어 음절 전체를 cmap에 등록하지만 8693개는 외곽선 없는 빈 글리프로, 힣·팋·탛 등 희귀 음절이 TextInput에서 사라지는 원인이었다. scripts/merge-fonts.py 수정: - fontTools Merger 대신 glyph 직접 교체 방식으로 변경 - NanumSquare 빈 글리프(contours=0) 탐지 후 Pretendard 글리프로 덮어씀 - UPM 불일치(Pretendard 2048 → NanumSquare 1000) scale_upem으로 정규화 - 합성 글리프(composite) 의존성 재귀 수집 지원 생성 폰트: assets/fonts/nanum-pretendard/ (4개 웨이트) fonts.ts: nanum-square-round → nanum-pretendard 경로 변경 .gitignore: 병합 결과물 제외 항목 삭제 (앱 빌드에 필요) Constraint: React Native는 CSS font-family 스택 미지원 — 단일 파일 병합 필수 Confidence: medium Scope-risk: narrow Not-tested: 실기기(iOS/Android) 렌더링 — 시뮬레이터 재확인 필요 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jihostudy
approved these changes
Jul 12, 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.
변경 요약
scripts/merge-fonts.py— NanumSquareRound 빈 글리프를 Pretendard로 교체하는 병합 스크립트 추가assets/fonts/nanum-pretendard/— 병합 결과물(4개 웨이트) 커밋src/lib/token/primitive/fonts.ts— 폰트 import 경로를nanum-square-round→nanum-pretendard로 변경.gitignore— 병합 결과물 제외 항목 삭제 (앱 빌드에 필요)배경 및 접근 방식
NanumSquareRound는 모든 11,172개 한국어 음절을 cmap에 등록하고 있지만, 8,693개는 외곽선 없는 빈 글리프(contours=0) 다.
힣,팋,탛등 드문 음절을TextInput에서 입력하면 iOS IME 조합 중 글자가 사라지는 현상의 원인이다.해결책으로 두 가지를 검토했다:
TextInput에서fontFamily제거TextInput만 시스템 폰트로 바뀌어 앱 전체 폰트와 시각적 불일치앱 전체가 NanumSquareRound를 사용하므로
TextInput만 폰트가 달라지면 시각적 이질감이 생긴다고 판단, 병합 방식을 선택했다.구현 세부 사항
fontTools라이브러리를 활용한 빈 글리프 교체 방식:fontFamily문자열 변경 없음체크리스트
.env*) 키 추가/변경pnpm-lock.yaml등) 변경참고 이슈