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

Removing the .godot directory will reset the font fallbacks, causing an error if the project uses translation. #80237

Closed
MarioMS08 opened this issue Aug 4, 2023 · 3 comments

Comments

@MarioMS08
Copy link

MarioMS08 commented Aug 4, 2023

Godot version

Godot Engine v4.1.1.stable.flathub

System information

Godot v4.1.1.stable (bd6af8e) - Freedesktop SDK 22.08 (Flatpak runtime) - Vulkan (Compatibility) - AMD Radeon Vega 8 Graphics (raven, LLVM 15.0.7, DRM 3.42, 5.15.0-78-generic) () - AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 Threads)

Issue description

Removing .godot with a font with fallbacks will cause an error on the first run if the project is using a translation, and the main scene (or other scenes?) contains node that using a translation key.

The next run will simply run the project without fallbacks for the font.

Steps to reproduce

  • Create a new project with at least two font files, with one of the font support the language of the translation.
  • Set one of the fonts as the fallback for the other.
  • Add translation in the project.
  • Make a scene that using such translation.
  • Run the scene.
  • Quit the project and delete the .godot directory.
  • Reopen the project.

For the Minimal reproduction project below

  • Because the project doesn't have the .godot directory, you'll get an error the first time you run it.
  • Reload the project, then add NanumGothicCoding-Bold.ttf as the fallback font for FreeMono.ttf.
  • Run the scene.
  • Optional: Reload the project to see if there is an error and run the scene.
  • Exit the project and delete the .godot directory.
  • Reopen the project.

Minimal reproduction project

Godot Font Fallback Test.zip (Updated)

@MarioMS08 MarioMS08 changed the title Removal of the .godot directory will reset the import files for the fonts, which will also remove the fallbacks. Removing the .godot directory will reset the font fallbacks, causing an error if the project uses translation. Aug 4, 2023
@MarioMS08
Copy link
Author

Updated.

@hhyyrylainen
Copy link

I think I can confirm this bug, I just did a reimport and seemingly all of my font files with fallbacks got edited to remove the fallbacks and the UIDs of the files changed. I was trying to fix a problem with font files refusing to load even with correct paths by reimporting everything, but that's probably not a pre-requisite to trigger this issue.

@Hilderin
Copy link
Contributor

Hilderin commented Sep 6, 2024

Fixed by #92667

@Hilderin Hilderin closed this as completed Sep 6, 2024
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.

5 participants