Skip to content

feat(form_fit): lay glyphs out at the advances of Hancom Office 2024 - #466

Merged
airmang merged 1 commit into
mainfrom
feat/form-fit-hancom-font-faces
Oct 15, 2026
Merged

airmang merged 1 commit into
mainfrom
feat/form-fit-hancom-font-faces

Conversation

@airmang

@airmang airmang commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

요약

FormFit과 쪽 수 추정의 글자 폭을 한컴오피스 2024의 한/글에 맞춘다. 두 커밋으로 나뉜다.

1. 한컴 글꼴 8종 추가 (0aaa4a2)

전에는 이 글꼴들의 한글 아닌 글자에 글자 종류 평균 폭을 썼다.

  • HCI Poppy·HCI Hollyhock·한양중고딕·한양신명조·한양견고딕·휴먼옛체(한컴 자체 글꼴 형식): 합성 문서를 여러 글자 크기로 한/글이 배치한 줄 나눔에서 읽은 폭. 모든 크기를 그대로 재현하는 단위로 넣었다(1024, 1000, 한양견고딕 4096). _GLYPHS 밖 글자는 평균 폭.
  • HY견명조·HY동녘M: 다른 HY 글꼴처럼 글꼴 파일의 설계 폭.

2. 한컴오피스 2024 배치에 맞춤 (17d9441)

  • !는 어느 글꼴에서든 반 em이다. 장평·자간은 다른 글자처럼 받는다.
  • 함초롬돋움의 간격 수정 문자·일반 문장 부호(따옴표 빼고)·통화 기호(…·※·‰·—·–·₩ 등)는 함초롬바탕의 폭이다. 함초롬돋움으로 대신 그리는 글꼴(한컴산뜻돋움·한컴 고딕 등)도 그렇다.
  • HY헤드라인M은 한컴오피스 2024에 든 글꼴 판의 설계 폭을 쓴다(라틴 글자 폭이 옛 판과 다르다).
  • 휴먼명조·휴먼고딕은 한/글이 배치하는 폭이다(1024 단위).
  • HY헤드라인M·휴먼명조·휴먼고딕의 그리스·키릴 문자와 글꼴에 없는 글자는 한/글이 배치하는 폭을 직접 넣었다.
  • HY견고딕·HY울릉도M·HY견명조·HY동녘M의 `는 0.584 em이다. HY울릉도M에 없는 글자는 함초롬바탕의 폭이다.

시험

  • 고정본 formfit_glyph_widths·formfit_script_symbols·formfit_hy_headline_cells를 한컴오피스 2024로 다시 저장했다.
  • 새 고정본:
    • formfit_hft_faces_cells(224칸): 고치기 전 123칸이 맞았다.
    • formfit_dodum_punctuation_cells(144칸, 함초롬돋움·한컴산뜻돋움·한컴 고딕의 문장 부호와 !): 고치기 전 100칸이 맞았다.
    • 두 고정본 모두 고친 뒤에는 전부 맞는다.
  • more_faces 고정본은 이 PC의 한/글에 없는 글꼴(HY중고딕 등)이 섞여 있어 그대로 두었다. 대신 함초롬돋움 쪽 —·‐·‑ 칸은 그 시험에서 빼고, 새 고정본이 검사한다.
  • FormFit·배치 시험이 모두 통과한다.

알려진 한계

  • 옛 판 한/글이 만든 줄 배치 정보를 지닌 문서는 !·… 등의 폭이 이번 기준과 다를 수 있다(그런 문서는 줄 배치 정보를 따르는 쪽이 맞다).
  • 새굴림의 문장 부호 일부는 한컴오피스 2024의 폭과 맞지 않아 그대로 두었다.

🤖 Generated with Claude Code

FormFit and the page estimate fell back to class averages for every glyph
that is not Hangul in HCI Poppy, HCI Hollyhock, 한양중고딕, 한양신명조,
한양견고딕, 휴먼옛체, HY견명조 and HY동녘M. They now take each glyph's advance:

- The faces Hancom ships in its own font format take the advances Hancom
  lays them out at, read from Hancom's line breaks of synthetic documents at
  several sizes, in the units per em that reproduce every size.
- HY견명조 and HY동녘M take their fonts' design advances, as the other HY
  faces do; a glyph they lack and the grave accent take 함초롬바탕's.

A Hancom-saved fixture holds each face's glyphs at the two widths where the
line count changes, at 10 pt and 30 pt; FormFit now matches every cell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@airmang airmang left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0aaa4a2 검토 완료. 신규 8글꼴의 _DESIGN 및 units-per-em 대응, 두 HY 글꼴의 fallback/vertical metrics, 기존 glyph lookup 경로와 224칸 Hancom 고정본을 확인했습니다. 기존 글꼴 행을 바꾸지 않으며 미등록 glyph의 기존 fallback 규약을 유지합니다. 원래 head에서 FormFit/배치 관련 검사 1,505개가 통과했고, #462/#463이 병합된 최신 main dd67a530bf656a1deb38c1192937a755a49346d0을 합친 검증 트리에서도 FormFit/배치/표 네임스페이스/HWP 읽기·쓰기 검사 1,787개가 통과했습니다. 최신 head의 GitHub 검사 13개 모두 성공했고 미해결 리뷰 스레드는 없습니다. 병합을 막는 결함을 찾지 못했습니다.

@airmang
airmang merged commit 3da8615 into main Oct 15, 2026
13 checks passed
@airmang airmang changed the title feat(form_fit): lay out eight more Hancom faces at their glyph advances feat(form_fit): lay glyphs out at the advances of Hancom Office 2024 Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant