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 import settings in an image as FontData sometimes fails to update in open scenes #91811

Closed
noidexe opened this issue May 10, 2024 · 3 comments · Fixed by #91897
Closed

Comments

@noidexe
Copy link
Contributor

noidexe commented May 10, 2024

Tested versions

  • Reproducible in 4.3-dev6
  • Not reproducible in 4.2.1-stable

System information

Windows 10.0.22631 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700S (Advanced Micro Devices, Inc.; 31.0.24031.5001) - AMD Ryzen 9 6900HS with Radeon Graphics (16 Threads)

Issue description

Updating a project from 4.2.1 to 4.3-dev6 a font broke, showing every character as "missing glyphs" with hex codes. It was png imported as FontData.

Changing the settings and re-importing didn't seem to fix it until I reassinged the png to the LabelSettings resource. After extracting the file to an MRP it seems reimporting doesn't always update the resource in open scenes. This didn't occur in 4.2.1

As regards the font breaking after upgrading from 4.2.1 to 4.3-dev6, I still haven't manage to reproduce that.

Steps to reproduce

  • Open the attached mrp with Godot 4.3-dev6
  • Open control.tscn
  • In the Filesystem dock, select "TimerNumbers_10.png"
  • Go to the Import tab
  • Change "columns" from 10 to 15 and click on "Reimport". The text displayed in the 2D viewport should now look garbled (as expected)
  • Change "columns" back to 10 and click on "Reimport".
    Expected: The text looks correct again
    Actual: No change.
    Workaround: You need to reopen the scene or reassing the png to LabelSettings for the changes to display correctly
  • After applying the aforementioned workaround, in Import change character range 0 from '0'-'9' to '0'-'5'. Missing glyphs are displayed as blocks with hex values (as expected)
  • Again, change the range back to '0'-'9'
    Expected: The text looks correct again
    Actual: No change.
    Workaround: You need to reopen the scene or reassing the png to LabelSettings for the changes to display correctly

This are just to examples, which work as expected in 4.2.1-stable. Here's a video showing the issue were for some reason it fails the first to update the first time but works when changing the value back.
https://github.com/godotengine/godot/assets/526829/528b99cb-0df9-4ac1-b4a2-8eec19401c3c

I assume it's related to emit_changed() not being called under some circumstances

Minimal reproduction project (MRP)

fontdata-mrp.zip

@noidexe noidexe changed the title Chaing import settings in an image as FontData sometimes fails to update in open scenes Changing import settings in an image as FontData sometimes fails to update in open scenes May 10, 2024
@Rubonnek
Copy link
Member

Could you test if it's reproducible in 4.3dev5?

@noidexe
Copy link
Contributor Author

noidexe commented May 10, 2024

Could you test if it's reproducible in 4.3dev5?

It is.

@matheusmdx
Copy link
Contributor

Bisecting points to #88664 as the culprit:

image

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.

6 participants