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

Changing the locale breaks remapped fonts #80130

Closed
tcoxon opened this issue Aug 1, 2023 · 2 comments · Fixed by #84873
Closed

Changing the locale breaks remapped fonts #80130

tcoxon opened this issue Aug 1, 2023 · 2 comments · Fixed by #84873
Assignees
Milestone

Comments

@tcoxon
Copy link
Contributor

tcoxon commented Aug 1, 2023

Godot version

4.1.stable.official

System information

Arch Linux

Issue description

I'm porting part of an old project that uses remapped font resources over to Godot 4. When the locale is changed, these fonts break, and an error is logged.

In the minimal project I've attached the error looks like:

E 0:00:00:0730   main.gd:4 @ _ready(): Condition "!font_owner.get_or_null(p_fonts[i])" is true. Returning: false
  <C++ Source>   modules/text_server_adv/text_server_adv.cpp:4031 @ _shaped_text_add_string()
  <Stack Trace>  main.gd:4 @ _ready()

In my full project I get many many errors that look like this (but I think the cause is the same):

E 0:00:05:0248   _font_draw_glyph: Condition "!fd" is true.
  <C++ Source>   modules/text_server_adv/text_server_adv.cpp:3370 @ _font_draw_glyph()

I remap the font resources to change the font that gets used when playing in Chinese, Japanese, or Korean. (Setting CJK fonts as fallbacks would be suboptimal, since the same unicode code point can often look different in Japanese vs Simplified Chinese.)

Steps to reproduce

  1. Download the attached minimal reproduction project.
  2. Run the main.tscn scene.
  3. Note that the text of the RichTextLabel node does not display.
  4. Note the error that gets logged.

Minimal reproduction project

godot4-font-remap.zip

@Calinou
Copy link
Member

Calinou commented Aug 2, 2023

@akien-mga
Copy link
Member

Confirmed reproducible in 4.2-beta5. CC @bruvzg

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

Successfully merging a pull request may close this issue.

4 participants