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

Wrong characters displayed in runtime with translations and Montserrat font #80762

Closed
brane-games opened this issue Aug 18, 2023 · 5 comments
Closed

Comments

@brane-games
Copy link

Godot version

4.1.1

System information

Linux

Issue description

image

In runtime, the characters are different than in the editor.

I could only reproduce with Montserrat font, and when Settings/Locale/test is set to sr

Steps to reproduce

Can be reproduced in the small project I uploaded.

Minimal reproduction project

font_issue.zip

@akien-mga
Copy link
Member

akien-mga commented Aug 18, 2023

Serbian locale can typically be either Latin or Cyrillic. I think with our OS.get_locale() formatting this would be sr_Latn or sr_Cyrl (following https://en.wikipedia.org/wiki/ISO_15924). Not sure which one is used by default if you specify only sr, but your test seems to show that it would be sr_Latn, while your OS/editor locale might be sr_Cyrl?

CC @bruvzg

@brane-games
Copy link
Author

When printing out OS.get_locale() I get en_US which makes sense because my OS is in english

@bruvzg
Copy link
Member

bruvzg commented Aug 21, 2023

These substitutes for Serbian are set in the font file itself, so Godot (it's done by HarfBuzz library in particular) is doing what font designer intended to be done:

Substitution list:
Screenshot 2023-08-21 at 11 14 13

Target glyphs:
Screenshot 2023-08-21 at 11 20 06

As a workaround, you can change language value (force it to en) in the Labels BiDi properties, it will affect rendering only and should not interfere with localization.

Screenshot 2023-08-21 at 11 25 14

@bruvzg bruvzg removed their assignment Aug 21, 2023
@bruvzg
Copy link
Member

bruvzg commented Aug 21, 2023

Also, I take a quick look at the Wikipedia, and this glyph style might be actually correct:

@brane-games
Copy link
Author

Thank you! I think it can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants