Write a glyph outline's coordinates through NumericString::decimal() (#76) - #305
Merged
Merged
Conversation
jakejackson1
force-pushed
the
feature/76-svg
branch
from
September 22, 2026 03:17
d4b2d38 to
6c41a97
Compare
jakejackson1
force-pushed
the
feature/76-glyph-outline-numbers
branch
from
September 22, 2026 03:19
d35986a to
cd4d37a
Compare
jakejackson1
force-pushed
the
feature/76-svg
branch
from
September 22, 2026 03:29
6c41a97 to
8205e99
Compare
jakejackson1
force-pushed
the
feature/76-glyph-outline-numbers
branch
from
September 22, 2026 03:30
cd4d37a to
563b922
Compare
jakejackson1
force-pushed
the
feature/76-svg
branch
from
September 22, 2026 03:49
8205e99 to
124d929
Compare
…76) GlyphOutline::number() repeated NumericString::decimal($value, 3) by hand: three places, trailing zeros trimmed, no -0. It now calls decimal(), which also writes a whole number as it is, as number()'s own shortcut for a simple glyph's points did. The output is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jakejackson1
force-pushed
the
feature/76-glyph-outline-numbers
branch
from
September 22, 2026 03:51
563b922 to
93ec1b8
Compare
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.
Part of #76. Stacked on #300, which adds
NumericString::decimal().GlyphOutline::number()trimmed a coordinate to three places by hand, exactly asNumericString::decimal($value, 3)does for the COLR and SVG glyph renderers andImage\Svg\Path. It now callsdecimal(). Its shortcut for whole font units, a simple glyph's points, is gone: #300 moved it intodecimal(), where every caller gets it. The output is unchanged: every snapshot and outline test still passes.Calling the shared helper costs about 25 µs per distinct glyph outline (measured over 1000 Noto Emoji glyphs). Outlines are cached per document, so a page of emoji pays well under a millisecond.
Tests
GlyphOutlineTest: a composite scaled by about a third draws its fractional points to three places (166.656 233.319).🤖 Generated with Claude Code