ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.5k stars 804 forks source link

Language translation via unicode does not work correctly in ruffle..... #5797

Open NewhereDigitalToys opened 2 years ago

NewhereDigitalToys commented 2 years ago

Describe the bug

Language translation via unicode does not work correctly in ruffle for some reason. I have attached an example .zip file: Translate_Language.zip Basically, what we want our website to do is open up a window box that would have 107 buttons (Although in the .zip file it only shows 3 buttons) to translate text to whatever native language the user using it speaks, read, or writes. Now this works good in Flash player translating all font via dynamic text field updating, but in current ruffle demo as of now, other languages other then English or German, does not translate right. like for example: the Japanese font does not fully load up in it.

Expected behavior

Everything is explained in "Describe the bug"

Affected platform

Self-hosted version

Operating system

Windows XP, Windows Vista, Windows 8, Windows 8.1, Windows 10, Android 8.1.0, Android 9, Android 11

Browser

Latest versions of Mozilla Firefox, Google Chrome, Puffin Web Browser

Additional information

No response

ousia commented 2 years ago

@NewhereDigitalToys, from what you describe this is an already known issue.

Ruffle isn’t able to use fonts from OS (as Flash does), only the ones embedded in the SWF file.

Ruffle includes an embedded font with glyphs for the ASCII charset (as explained in #1862).

This is why the English text is displayed fine, the German text is missing ü in für, and the Japanese text isn’t displayed at all.

I’m afraid it might take a while to fix the issue (#1862). But as as general rule, I think it is wise to embed fonts in documents (otherwise, the display may not be the same for some users).

I hope it is clear now and it helps.

NewhereDigitalToys commented 2 years ago

Yeah nosamu and others explained it to me on discord. As I told them, I will just wait until "use all device fonts" gets implemented in a ruffle update.

ousia commented 2 years ago

@NewhereDigitalToys, in that case, this issue is a duplicate of #1862 (well, as it seems that at least other other eleven issues are).

NewhereDigitalToys commented 2 years ago

Ok.