Description
Godot version
4.0.1.stable.official [cacf499]
System information
Windows 10, OpenGL API 3.3.0 NVIDIA 528.49
Issue description
The editor hard crashes when a specific sequence of actions is done on the Label Settings
of a Label
control. It seems that selecting only one specific font as a SystemFont the editor crashes. For me it happens with "NotoColorEmoji-Regular.ttf" (version 2.038;GOOG;noto-emoji:20220906:4b1c5bfb0d5b1f5c69aa321d5b6e70656ead1d30
) installed in C:\Users\MYUSERNAME\AppData\Local\Microsoft\Windows\Fonts
; it might be because only that one font file sits there as the only Noto font file installed system wide, but regardless the Godot Editor should probably not hard-crash when this happens?
Steps to reproduce
Edit: even easier steps
- Download https://fonts.google.com/noto/specimen/Noto+Color+Emoji/
- Create new project
- Drag the
.ttf
to the Godot window file root
- Result: the font file name shortly appears in Godot's file explorer before it crashes
Original steps
- Create a new project
- Add a root
Control
scene - Add a
Label
child - Add "New Label Settings" and expand it
- Expand the "Font" section, click the "" in the dropdown, pick "
New SystemFont
" - Click "SystemFont" to expand it
- Click "Font Names" value "PackedStringArray (size 0)" to expand it
- Pick "+ Add Element" and choose "Courier New"
- Pick "+ Add Element" and choose "Noto Color Emoji"
- Click the trash icon next to "Courier New" to delete it
-
Result: editor window immediately crashes and closes down
-
Expected: array of font names to go back to 1, or a warning that my operation is not allowed
-
Variant steps: at step 8 (when no fonts are picked yet at all), add "Noto Color Emoji" as the first one
Minimal reproduction project
See steps to reproduce, it happens when starting clean as well.
Hope this helps! Let me know if I can add more details.