Skip to content
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

[Impeller] Attempt to minimize jittering of glyphs when scaling text. #56414

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chinmaygarde
Copy link
Member

@chinmaygarde chinmaygarde commented Nov 6, 2024

As I understand, the issue was not caused by the relative positions of glyphs within the run. Instead, by the inconsistent rounding of the scale which was then used to calculate the UV positions.

I have not fully reasoned about the consequences of the fix when the text exceeds the maximum allowable text scale.

This patch does make the linked test case have almost no jitter. The user reported issue also seems to be fixed.

After

Demo.mp4

Before

336405310-be79d790-c570-4590-92a1-4702922517e8.mov

@chinmaygarde chinmaygarde added the Work in progress (WIP) Not ready (yet) for review! label Nov 6, 2024
@jonahwilliams
Copy link
Member

This is definitely better, but I still see some sliding of the as especially at the start of the curve.

Some thoughts: I wonder if Skia is modifying the transform, rounding it to a integral value. We round but only for cache efficiency.

I wonder if skia is accumulating the rounding error. So if you have a string ABC and round A down by 0.2, then shift the starting point of B/C down and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants