Skip to content

iOS Metal: draw glyphs larger than 256px instead of dropping them - #6396

Open
shai-almog wants to merge 10 commits into
masterfrom
ios-metal-oversize-glyphs
Open

shai-almog wants to merge 10 commits into
masterfrom
ios-metal-oversize-glyphs

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Fixes #6393.

The Metal glyph atlas refused any glyph whose bitmap passed 256px and CN1MetalDrawString skipped it silently, so a 20mm Material icon (360-400px on an iPhone) reserved its space and drew nothing.

  • A glyph above the 256px packing cap gets a texture of its own, owned by its slot.
  • Past 1024px a glyph is rasterised smaller and the quad scales it up, so a TV-size glyph never costs more than 1024x1024.
  • Oversized textures are held to a 32 MB budget per atlas; past it they are dropped and rasterised again on next use.
  • LargeGlyphScreenshotTest covers both paths in fixed pixels: a 300px FontImage icon and a 1300px glyph drawn as text. No test drew text above 48px before, which is why nothing caught this.

🤖 Generated with Claude Code

shai-almog and others added 7 commits December 5, 2026 05:35
)

The glyph atlas refused any glyph whose bitmap exceeded 256px and
DrawString silently skipped it, so a 20mm Material icon (360-400px on
an iPhone) reserved its space and drew nothing. Oversized glyphs now
get a texture of their own, owned by the slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est for large glyphs (#6393)

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d bbox before int conversion

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… status manifest change

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

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Golden capture needs attention

Test iOS UI build scripts capture was cancelled; re-run Golden capture

Whatever did arrive is committed; the next push captures only what is still missing. A test that cannot render on some port needs a // cn1ss-skip: <ports> declaration.

Run at 5e4303529b27

github-actions Bot and others added 3 commits December 5, 2026 22:03
…ens capture it

The first capture showed nothing of it on Android: drawn at the line top,
the glyph's top lands ~500px down, past a small screen's bottom. The five
goldens harvested from that capture are dropped to be recaptured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

[Bug] Material account-circle icon renders at 5 mm but is invisible at 20 mm on iOS

1 participant