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

[twice-regressed] Hebrew chars not displayed at all #8885

Open
ousia opened this issue Dec 21, 2022 · 12 comments
Open

[twice-regressed] Hebrew chars not displayed at all #8885

ousia opened this issue Dec 21, 2022 · 12 comments
Labels
text Issues relating to text rendering/input

Comments

@ousia
Copy link
Contributor

ousia commented Dec 21, 2022

Describe the bug

This comes from #5839.

https://github.com/ruffle-rs/ruffle/files/6273851/clock.zip should have chars displayed as:

clock-fs8

#5839 was solved by #5900.

But using current nightly from 2022-12-21, Hebrew characters aren’t displayed at all:

Expected behavior

Hebrew characters should be displayed (ideally, R2L and not L2R [as already reported in #3921]).

Many thanks for your help.

Affected platform

Online demo

Operating system

Fedora 35

Browser

Firefox 107

Additional information

No response

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

ousia commented Dec 21, 2022

Screenshot from browser (since I haven’t generated the Windows image myself):

clse-fs8

@danielhjacobs
Copy link
Contributor

danielhjacobs commented Dec 22, 2022

You can try to find when it regressed using https://ruffle-regressions.github.io/.

If you don't, someone else probably will, though I'm busy right now.

Edit: Or do you mean it just regressed?

@ousia
Copy link
Contributor Author

ousia commented Dec 22, 2022

@danielhjacobs,

many thanks for the info on https://ruffle-regressions.github.io (I didn’t know there was such a site).
According to the images:

displayed-l2r-fs8

Nightly from 2022-09-08 seems to be the culprit:

notatall-displayed-fs8

So the code is nightly-2022-09-07...nightly-2022-09-08.

The only PR related to text seems to be #7853 (but I may be wrong here, since there seems to be no EditText in the SWF).

@dhtdht020, could you also confirm whether texts are displayed R2L? On Linux, texts seem to be the same.

two-texts-fs8

Many thanks for your help.

@n0samu
Copy link
Member

n0samu commented Dec 22, 2022

Looks like the characters are displayed incorrectly in the Linux Flash projector but correctly in the Windows Flash projector. Here's how the bottom-left text looks for me in the Windows projector:
image

@n0samu n0samu added swf Related to the SWF format text Issues relating to text rendering/input regression Something was working before, but is now broken labels Dec 22, 2022
@n0samu
Copy link
Member

n0samu commented Dec 22, 2022

The only PR related to text seems to be #7853 (but I may be wrong here, since there seems to be no EditText in the SWF).

That is indeed correct - I've bisected the problem to commit 84481c2 of that PR. The SWF actually creates all of its text fields at runtime using createTextField.

@ousia
Copy link
Contributor Author

ousia commented Dec 22, 2022

@n0samu,

I get the same output with the Windows Flash projector using Wine in Linux.

wine-clock-fs8

Many thanks for your help.

@n0samu
Copy link
Member

n0samu commented Dec 22, 2022

Hmm, well Wine has never worked well with non-English characters, in my experience.

@ousia
Copy link
Contributor Author

ousia commented Dec 22, 2022

My knowledge or other scripts (and languages) is limited to L2R.

So I didn’t know that Wine had problems with R2L.

@dhtdht020
Copy link

I can confirm this is still an issue as of Nightly 2023-09-08.
image
Could also replicate this exact issue on Linux through online demo on firefox, so does not seem platform-specific.

@dhtdht020, could you also confirm whether texts are displayed R2L? On Linux, texts seem to be the same.

@ousia Sorry for not responding, GitHub did not notify me about the mention. The text in the Flash Player running under wine is displayed in the wrong order similarly to the problem presented in #3921, unlike Flash Player running on a proper Windows installation which displays the text correctly.

@n0samu n0samu removed bug Something isn't working swf Related to the SWF format regression Something was working before, but is now broken labels Jan 15, 2024
@n0samu
Copy link
Member

n0samu commented Jan 15, 2024

After looking more into this, it unfortunately seems to be expected behavior, not a bug. The SWF contains an Arial font with all of the needed characters, but does not actually use the embedded font. It only works in Flash Player because it is able to load the Arial font installed on the user's device. Now that #14535 was merged, it works in the desktop app, at least. To work on the web, either the code would need to be modified, or a second SWF containing the required font would need to be created and Ruffle would need to be configured to use it. See the FAQ for instructions.

@ousia
Copy link
Contributor Author

ousia commented Jan 21, 2024

@n0samu, is there no way for the web to load device fonts, such as the desktop app does?

@n0samu
Copy link
Member

n0samu commented Jan 21, 2024

Yes, currently the web environment does not support loading fonts from the user's device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
text Issues relating to text rendering/input
Projects
None yet
Development

No branches or pull requests

4 participants