fix: pixel-snap UI text glyphs for crisp rendering on HiDPI#1680
Open
cantona wants to merge 2 commits into
Open
fix: pixel-snap UI text glyphs for crisp rendering on HiDPI#1680cantona wants to merge 2 commits into
cantona wants to merge 2 commits into
Conversation
UI text (tab titles, pickers, rename input) placed each glyph quad at pen_x = logical * scale_factor without rounding. On HiDPI/fractional- scale displays that origin is almost always fractional, so the rasterized glyph gets resampled and looks blurry. Snap each quad to integer physical pixels, matching how the cell-aligned grid text stays crisp. No effect at integer scale 1.0 (positions already whole).
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.
UI text (tab titles, color picker, rename input) placed each glyph at
logical * scale, which is almost always fractional on HiDPI / fractional-scale displays. Placing a rasterized glyph at a sub-pixel position resamples it and makes the text look blurry. Snap each glyph quad to integer physical pixels, matching the crisp cell-aligned grid text.