Repository navigation
Native-resolution surfaces and anti-aliased vector text - #6
Merged
Merged
Conversation
Windows report physical pixels and a scale factor (Retina on Cocoa, system DPI on Win32, ENGINE_UI_SCALE or GDK_SCALE on X11) and every renderer is created at that size. The 5x7 bitmap font is replaced by an in-repo stroke outline font tessellated into analytic anti-aliased triangles through a new overlay triangle primitive, drawn by the CPU, Vulkan and Metal paths. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PtKQ2WViU4Go8As9to1xh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PtKQ2WViU4Go8As9to1xh
Baker-Harrison
changed the base branch from
claude/project-thread-10f5vi-game
to
main
November 1, 2026 03:29
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.
Requested by Harrison · project thread
Step 1 of the approved quality-by-construction plan, stacked on #5.
What changes
backingScaleFactor, sets the layer's contents scale and creates the Metal drawable (and the CPU framebuffer) in physical pixels. Win32 becomes DPI aware and creates its window at the system DPI scale. X11 honorsENGINE_UI_SCALEorGDK_SCALE.Window::size()now returns physical pixels andWindow::scale_factor()reports the scale;runprints both.src/font.rsholds hand-written stroke outlines for letters, digits and punctuation, andUitessellates them into ribbons with a one-pixel analytic anti-aliasing fringe (per-vertex alpha), so text is crisp at any size and DPI.Ui::set_targettells the UI the real pixel size so the fringe stays one pixel wide.Scene::overlayis nowVec<OverlayItem>(rect or alpha-blended triangle), drawn by the CPU, Vulkan and Metal paths. The dynamic vertex budget rose to 400k.Verified on Linux
Generated by Claude Code