-
-
Notifications
You must be signed in to change notification settings - Fork 940
text: Fix x/y scaling of device text glyphs #22209
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
base: master
Are you sure you want to change the base?
Conversation
|
This also fixes #16745! |
e0d59aa to
798f205
Compare
This is needed as this transformation applies device-text specific scaling.
This makes sure that the device-text specific transforms are applied.
Device text requires non-translation-only transformations in the layout_to_local_matrix, which requires the generic inverse() function to be called when calculating its inverse.
Device text in FP cannot be scaled independently in x/y. Only the y scale is applied, and the x scale is set so that the aspect ratio of characters is preserved. It's used only for calculating metrics and sizing bounds.
Tests basic translations applied to device text.
798f205 to
eaf94dc
Compare
|
With this, #22113 displays this: The text is no longer stretched, but it's not in the right place anymore. |
|
@kjarosh @Lord-McSweeney IMHO, i don't think is due to this PR because is already happens in this following example where text is getting behind the input field : https://mep-col.sesamath.net/dev/swf/exo657.swf?idMep=91&modeleMep=1&abreviationLangue=fr&idSwf=91&ch=n&idAide=79&isBoutonSuite=o&isBoutonAide=o |



MOUSE_OUT->gotoAndStop()causes text to vanish. #15110Device text in FP cannot be scaled independently in x/y. Only the y scale is applied, and the x scale is set so that the aspect ratio of characters is preserved. It's used only for calculating metrics and sizing bounds.
This PR contains a bunch of patches that bring us closer to FP's behavior. We're still not perfect, especially related to measurements, but the good news is that it's a mess in Flash Player too, just a different one.
The main issue with dependent x/y scaling is that measurements operate in unscaled coordinate space, meaning that we have to emulate the size of the unscaled glyphs. If
scaleX/scaleY == 0.5, we have to act as if glyphs were twice as wide.After this PR Ruffle still behaves differently, especially related to: