-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text snaps to pixel grid, images don't #2093
Conversation
LGTM |
@@ -52,7 +52,7 @@ double Paragraph::ideographicBaseline() | |||
|
|||
void Paragraph::layout() | |||
{ | |||
FontCachePurgePreventer fontCachePurgePreventer; | |||
FontCachePurgePreventer fontCachePurgePreventer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not that i care, but fyi there's a new trailing space here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHUT DOWN EVERYTHING
I would think the text renderer might want to know the sub-pixel positioning itself. But this will probably work for now. |
Previously, we tried to use the render tree's paint offset to move the text to the proper position, but that appears to snap to integer logical pixels, introducing jitter. Now we use the SkCanvas's matrix to position the text, removing the jitter. Fixes flutter/flutter#234
Yeah, unfortunately there's no way for it to know (on the web too) because you might have a transform higher in the tree that's changed your coordinate system. |
Text snaps to pixel grid, images don't
* 0.1.116 * typo * typo * marked no_default_cases as experimental
Previously, we tried to use the render tree's paint offset to move the text to
the proper position, but that appears to snap to integer logical pixels,
introducing jitter. Now we use the SkCanvas's matrix to position the text,
removing the jitter.
Fixes flutter/flutter#234