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

Game text display #18877

Open
a1245661652 opened this issue Dec 6, 2024 · 5 comments
Open

Game text display #18877

a1245661652 opened this issue Dec 6, 2024 · 5 comments
Labels
bug Something isn't working text Issues relating to text rendering/input

Comments

@a1245661652
Copy link

Describe the bug

Ruffle desktop version text displays normal, but web version does not display
window:
Image

web:
Image

Expected behavior

The web also displays text normally like a window

Content Location

RumbleBugs - cn.swf.zip

Affected platform

Browser's extension

Operating system

window11

Browser

chrome 131.0.6778.87

Additional information

No response

@a1245661652 a1245661652 added the bug Something isn't working label Dec 6, 2024
@kjarosh kjarosh added A-web Area: Web & Extensions text Issues relating to text rendering/input labels Dec 6, 2024
@kjarosh
Copy link
Member

kjarosh commented Dec 6, 2024

Doesn't work for me on desktop too. I suspect that's related to the fact that we're falling back to device fonts when no embedded font is found (the font here is embedded). I doubt it's web-related, we just somehow don't manage to display the embedded font from the SWF.

@kjarosh kjarosh removed the A-web Area: Web & Extensions label Dec 6, 2024
@kjarosh
Copy link
Member

kjarosh commented Dec 6, 2024

Alright, so upon further testing it seems that it's a bug on desktop that the text is showing at all. Flash Player does not show the text, which makes sense because the text shouldn't be rendered when the embedded font is missing, and in this case it is. The text requires the font SimSun, but the SWF provides only fonts: MS PGothic, Comic Sans MS, SimHei, Arial.

I suspect the SWF is broken or is was meant to be used as a part of something bigger.

Can you verify whether the text is not shown using Flash Player for you too? (to make sure it's not locale- or device-font-related)

@a1245661652
Copy link
Author

We repaired the swf file, Embedding bold text,but the text in this code still cannot be displayed correctly
desktop and Flash Player (normal display)

Image
Image

web(Unable to display text in code)

Image

The desktop version is already compatible with Chinese character references. I hope the web version will be compatible.

@a1245661652
Copy link
Author

RumbleBugs - cn-s.swf.zip
Here is the new swf

@kjarosh
Copy link
Member

kjarosh commented Dec 9, 2024

The text you're referring to requires device fonts to work (SimHei), which basically means that the SWF is not portable because instead of providing its own fonts, it requires that the user has fonts installed. I don't have this font so it doesn't work for me on desktop too, and it is problematic on web, where we don't have access to device fonts. See https://github.com/ruffle-rs/ruffle/wiki/Frequently-Asked-Questions-For-Users#how-do-i-change-the-fonts-used-by-flash-on-my-website

Of course the text shows for me in Flash Player, and it's a bug that it does not show in Ruffle.

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

No branches or pull requests

2 participants