-
-
Notifications
You must be signed in to change notification settings - Fork 839
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: Limit font name length to 64 characters in TextFormat #19263
base: master
Are you sure you want to change the base?
Conversation
d36c2f7
to
405be28
Compare
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.
Should every place where we use/construct text_format
natively in (even font tags and avm1) have this logic?
This test verifies the behavior of TextFormat.font and its maximum length.
This test verifies the behavior of TextFormat.font and its maximum length.
405be28
to
0dbc263
Compare
Did more tests and it seems that no, it's just the AVM1/AVM2 setters which clamp it to 64 (e.g. it's not the case in HTML). The reason I implement this is CSS, where you can specify a list of fonts and the list can get quite large, but as AVM2 setters are used there, its length is clamped to 64. Regarding SWF tags, we have a buggy logic there anyway, because Flash treats each font class as a reference to a SWF tag, and not a font family per se (which we treat it as). I pushed fixes for AVM1 too (with a test). |
That's what Flash Player does ¯\_(ツ)_/¯