Skip to content

cannot read the glyph inside a button #6581

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

Closed
ousia opened this issue Apr 1, 2022 · 5 comments
Closed

cannot read the glyph inside a button #6581

ousia opened this issue Apr 1, 2022 · 5 comments
Labels
A-avm1 Area: AVM1 (ActionScript 1 & 2) bug Something isn't working text Issues relating to text rendering/input

Comments

@ousia
Copy link
Contributor

ousia commented Apr 1, 2022

Describe the bug

The attached SWF file (remove the .mov extension, since it is a Flash animation) contains a full screen button using and edit text and a variable that changes values when full or normal screen .

arrows.swf.mov

It goes fullscreen and it resizes to normal size.

Ruffle isn’t able to display the glyphs from the font when used inside a button.

If the button contains an outline, it is displayed just fine.

I’m attach a sample file (again, .mov extension has to be removed first).

outline-arrows.swf.mov

Expected behavior

Glyph from the button should be displayed, the same way the outline from the button is displayed.

The player from Adobe displays both fine.

Many thanks for your help.

Affected platform

All of them.

Operating system

Any of them.

Browser

Any of them.

Additional information

No response

@ousia ousia added the bug Something isn't working label Apr 1, 2022
@ousia
Copy link
Contributor Author

ousia commented Apr 3, 2022

Here is what the player from Adobe displays:

flhp

And here is what Ruffle displays:

rffl

BTW, sample images come from a slightly modified SWF file (.txt extension added to enable upload to GitHub).

@Herschel
Copy link
Member

Herschel commented Apr 3, 2022

This is the same issue as #2181. The glyph is a text field inside a button, with a variable binding of arrow_fullscreen_text. Even though this is a v7 SWF, resolving a text field variable path should act like SWFv5, where buttons are not valid display objects, so arrow_fullscreen_text should resolve to _root.arrow_fullscreen_text, but Ruffle resolves it on the button as _root.arrow_fullscreen.arrow_fullscreen_text.

@Herschel Herschel added text Issues relating to text rendering/input A-avm1 Area: AVM1 (ActionScript 1 & 2) labels Apr 3, 2022
@ousia
Copy link
Contributor Author

ousia commented Apr 4, 2022

Many thanks for your reply, @Herschel.

So if I don’t get it wrong, this issue may be solved by #5492 (which would also fix #1561, among many others).

Many thanks for your excellent work.

@ousia
Copy link
Contributor Author

ousia commented Jul 31, 2023

I have realized that #6581 (comment) contains a fix to avoid the problem in newly generated SWFs.

Naming and calling the text variable as _root.arrow_fullscreen_text leaves nothing to be resolved and avoids the issue.

Since this seems to be a duplicate of a previously reported issue (#2181), I’m closing this one myself.

@ousia ousia closed this as completed Jul 31, 2023
@ousia
Copy link
Contributor Author

ousia commented Aug 6, 2023

Only commenting to say it has been fixed by @michiel2005 with #12541 (huge thanks for that!).

Many thanks to @n0samu (I was aware of the fix through #11317 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm1 Area: AVM1 (ActionScript 1 & 2) bug Something isn't working text Issues relating to text rendering/input
Projects
None yet
Development

No branches or pull requests

2 participants