Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

TextField AutoScale clips text if multiline and > 100% display scale #1073

Open ljurow opened 4 years ago

ljurow commented 4 years ago

If you have a text field that is tall enough to handle multiple lines of text and autoscale=true AND your display scale setting (in windows) is more than 100%, it clips the text field at the wrong size. Note that this works correctly in the Flash Player Project, but incorrectly in a browser.

autoscale

PrimaryFeather commented 4 years ago

I guess we are talking about a TrueType font, not a bitmap font, right?

If so, it does sound like I'm getting the wrong text bounds in the browser, which would mean that it's a bug somewhere in the Flash plugin or its browser integration. Which (if I'm right) would need fixing by Adobe. However, since the Flash plugin will be deactivated by browsers by the end of this year, it's unlikely that we will see a fix, I'm afraid. :-/

JohnBlackburne commented 4 years ago

In my experience the Flash Player app does an excellent job of replicating the environment of Flash Plugin in a desktop app. Except in one aspect. It seems to handle scaling differently. It has a lot of options for scaling, to simulate what you can do in the browser, but in many cases effects achieved in the browser due to scaling cannot be achieved in Flash Player, or vice-versa.

This probably happens to some extent as developers rarely tested how their browser apps performed when scaled – I know I didn’t. It means though that Flash Player app is not a good test bed for how to handle scaling when running in a browser. And as Daniel notes it is highly unlikely any browser bugs will be fixed. Adobe have indicated they will only be doing security fixes.