Skip to content

fix(form_fit): give a no-break space its 장평 and no 자간 - #503

Merged
airmang merged 1 commit into
mainfrom
fix/form-fit-no-break-space-keeps-no-spacing
Oct 17, 2026
Merged

airmang merged 1 commit into
mainfrom
fix/form-fit-no-break-space-keeps-no-spacing

Conversation

@airmang

@airmang airmang commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • FormFit and the page estimate laid a no-break space (hp:nbSpace) out like a space: its 장평 and its 자간 both applied.
  • Hancom Office applies the 장평 to a no-break space but not the 자간. At 9 pt, 장평 120 % and 자간 -12 %, one is 536 HWPUNIT, not 472.
  • Spaces and fixed-width spaces keep their advances, as before.

Test plan

  • A Hancom-saved fixture (formfit_space_scaling, 맑은 고딕 at 9, 10 and 14 pt under eight 장평 and 자간): "가", three no-break spaces, fixed-width spaces or spaces, then a tab. Every tab width matches. The test fails before the change.
  • Lint, format, type checks and the other repository gates
  • Layout and FormFit tests

🤖 Generated with Claude Code

@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.

Reviewed exact head 5decc87 and surrounding space/glyph scaling paths. The hp:nbSpace mapping takes width ratio while excluding letter spacing in the half-em path; ordinary/fixed-width space handling is preserved. Checked direct 536-vs-472 assertions and Hancom-saved tab fixtures across sizes and scaling combinations. No code defect found. All 146 local FormFit tests pass. All 13 exact-head checks pass; verified workflow SHA and read test/lint/type/hygiene logs (6,867 passed, 18 skipped, 1 xfailed).

Merge is held: scratch integration with current main 97c2bef reproduces content conflicts in CHANGELOG.md, src/hwpx/form_fit/measure.py, and tests/test_form_fit_hancom_rules.py after #501. Resolve preserving both bold-width and no-break-space behavior and both fixture/test additions, then rerun the combined FormFit/layout regression tests and latest-head checks. No resolution was pushed; conflicted integration was aborted.

@airmang
airmang force-pushed the fix/form-fit-no-break-space-keeps-no-spacing branch from 5decc87 to cd1b4e2 Compare October 17, 2026 11:15
FormFit and the page estimate laid a no-break space (hp:nbSpace) out like a space, its 장평 and its 자간 both
applied. Hancom Office applies the 장평 but not the 자간: at 9 pt, 장평 120 % and 자간 -12 % one is 536, not
472. A Hancom-saved fixture holds no-break, fixed-width and plain spaces before tabs under several 장평 and
자간.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@airmang
airmang force-pushed the fix/form-fit-no-break-space-keeps-no-spacing branch from cd1b4e2 to 9593e67 Compare October 17, 2026 11:44
@airmang
airmang merged commit fe5791d into main Oct 17, 2026
12 checks passed
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