Skip to content

Measure glyph layout at the requested font scale - #5

Merged
TxCsOffc merged 1 commit into
TxCsOffc:mainfrom
LuizDusky:fix/font-logical-scale
Nov 25, 2026
Merged

TxCsOffc merged 1 commit into
TxCsOffc:mainfrom
LuizDusky:fix/font-logical-scale

Conversation

@LuizDusky

Copy link
Copy Markdown
Contributor

GT7 requests logical glyph metrics at 10,000 × 10,000 and 9,000 × 7,500. Measuring those advances at the rasterizer's 128-pixel limit collapses neighboring glyphs onto each other. This change measures advances, bearings, bounds and horizontal line layout from the outline at the requested X/Y scales. Rasterization keeps its existing allocation limit.

On a Mac mini M4 running the Prospero fork, World Map, Music Rally and header labels became readable. Some spacing remains uneven. The game capture used the fork's Metal mesh draw offsets as well.

The new font_metrics regression uses the bundled font and checks independent X/Y scale ratios, the space advance and the bitmap bound. Run cmake --build <build> --target font_metrics_tests and ctest --test-dir <build> -R '^font_metrics$' --output-on-failure. The test passed on arm64 in the fork.

@TxCsOffc TxCsOffc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed the outline-based logical metrics calculation in libFont.cpp and verified both font_metrics_tests (ctest -R '^font_metrics$') and kyty_emulator build and pass cleanly on macOS arm64. Merging!

@TxCsOffc
TxCsOffc merged commit 68c9cb3 into TxCsOffc:main Nov 25, 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.

2 participants