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

Changes in editor to DynamicFontData are not reflected in 2D view. #27106

Closed
MelvinWM opened this issue Mar 15, 2019 · 2 comments
Closed

Changes in editor to DynamicFontData are not reflected in 2D view. #27106

MelvinWM opened this issue Mar 15, 2019 · 2 comments

Comments

@MelvinWM
Copy link
Contributor

Godot version:
master-branch, recent (775e74e)

Issue description:
When making changes to a DynamicFontData sub-resource in the inspector in the editor, the changes are not reflected visually in the 2D view, unless the editor is restarted or changes are made to unrelated properties in DynamicFont. The bug is AFAICT editor-only.

Steps to reproduce:

  • Create a Label.
  • Enter some text for the Label
  • In the inspector for the Label, create in "Custom fonts" a DynamicFont.
  • For the DynamicFont, create in "Font -> Font data" a DynamicFontData.
  • For the DynamicFontData, select in "Font Path" a font resource (for instance "FreeSans.ttf" as in the reproduction project).
  • Note that the label text is buggily not drawn in the 2D view of the editor (it is drawn when running the game).
  • Change an unrelated property, for instance size, in DynamicFont, and check that the text is now drawn in the 2D view of the editor. You can also restart the project instead to get the text to be drawn.
  • Note that the text drawn in the 2D view is drawn antialiased as per the default.
  • Change the antialiased setting in DynamicFontData to not be antialiased.
  • Note that the text in the 2D view buggily does not reflect this change in antialiasing.
  • Change an unrelated property, for instance size, in DynamicFont, and check that the text in the 2D view now correctly is not antialiased.

Minimal reproduction project:
A simple reproduction project with a font resource that makes it easier to follow the reproduction steps:
dynamicfontdata_bug.zip

Other comments:
The bug seems to occur due to changes being made directly to the DynamicFontData resource through the editor being not indicated to the DynamicFont resource in the editor that uses the DynamicFontData. I do not know whether similar bugs might occur or have occurred for similar cases.

@akien-mga
Copy link
Member

Still reproducible in 3.2.2 RC 2 with the above steps to reproduce the bug.

@akien-mga
Copy link
Member

I can confirm that the issue is still valid in 3.3, and fixed in 4.0. It's unlikely that the fix could be backported as it's probably related to Complex Text Layout/Font changes and/or the refactor of the Inspector and property change signalling.

@akien-mga akien-mga added this to the 4.0 milestone Apr 28, 2021
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