Repository navigation
enhance(native): rasterize Linux text with subpixel coverage - #429
Closed
tiensonqin wants to merge 5 commits into
Closed
tiensonqin wants to merge 5 commits into
tiensonqin wants to merge 5 commits into
Conversation
Use horizontal RGB subpixel rasterization for monochrome Pango glyphs and mark those bitmaps as scene subpixel glyphs. Keep grayscale and aliased rendering available through LUI_TEXT_ANTIALIAS.
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
There was a problem hiding this comment.
Devin Review found 4 findings. Devin automatically fixed all 4 findings.
Fixed by Devin (4)
- Mask test assumes grayscale default — Updated the existing rasterization contract test for the new default four-channel subpixel coverage and corrected ink counting for color-atlas bitmaps.
- Subpixel test accepts grayscale coverage — The coverage test now requires at least one pixel whose red, green, and blue coverage differs when subpixel rasterization is active.
- Antialiasing overrides break the default test — The test now reads LUI_TEXT_ANTIALIAS and expects the documented one-byte mask format in gray/none modes instead of always requiring four bytes.
- Untinted text in Linux windows — Fixed the Linux glyph emitter: subpixel masks now set gsubpixel and stay out of the color-glyph branch, while real color fonts remain color glyphs.
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.
Summary
Rasterize monochrome Linux/Pango glyphs with horizontal RGB subpixel coverage by default, following the mygo/Pango approach, so native text is closer to browser text at scale 1 instead of grayscale-only antialiasing.
lui_text_pangonow requests Cairo subpixel antialiasing, emits RGBA color-atlas bytes for LCD coverage, and keeps real color fonts on the existing color-bitmap path.gsubpixelscene glyphs so renderers tint them with the foreground color instead of treating coverage as literal premultiplied colors.LUI_TEXT_ANTIALIAS=grayorLUI_TEXT_ANTIALIAS=nonebefore startup preserve the old grayscale/aliased behavior.Validation
Isolated real Logseq Linux SDL validation passed after the companion host integration in logseq#14158: GL and raster backends both produced dark/theme-tinted subpixel text, the grayscale fallback produced zero channel deltas, and color emoji retained correct RGB order.
Known limitation: the implementation currently assumes horizontal RGB panel order and does not yet read desktop
gtk-xftsettings; users with BGR/rotated panels can use the grayscale escape hatch.Link to Devin session: https://app.devin.ai/sessions/4db1c451562249ac8356dbf66216a01b
Open in Devin Desktop: https://app.devin.ai/desktop/session/4db1c451562249ac8356dbf66216a01b?variant=devin
Requested by: @tiensonqin
🟢 Devin fixed all 4 findings · Follow Devin's work