Skip to content

Comments

Add missing font file filters in hint string#104453

Closed
beicause wants to merge 1 commit intogodotengine:masterfrom
beicause:add-missing-font-file-filter
Closed

Add missing font file filters in hint string#104453
beicause wants to merge 1 commit intogodotengine:masterfrom
beicause:add-missing-font-file-filter

Conversation

@beicause
Copy link
Contributor

@beicause beicause commented Mar 21, 2025

Adds the missing *.ttc *.otc in hint string for selecting font files, which are supported by:

@beicause beicause requested a review from a team as a code owner March 21, 2025 17:07
@KoBeWi KoBeWi added this to the 4.5 milestone Mar 21, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Mar 21, 2025

It would be nice to automate it somehow, instead of hard-coding.
Unfortunately get_recognized_extensions_for_type("FontFile") returns also image files, not sure how to get only supported fonts.

@bruvzg
Copy link
Member

bruvzg commented Mar 21, 2025

Adding *.ttc *.otc without adding (and using when loading the font) face_index properties for the same editor fonts is not useful. These types are font collections and simply selecting the file will always use the first font in collection.

@beicause
Copy link
Contributor Author

beicause commented Mar 22, 2025

I decide to close this. Not being able to select face index makes font collections not useful for editor and default theme font. We can add face index to editor settings and project settings, but it is kind of niche.

As a workaround for default theme font, face index can be set in a custom FontVariation, but this cannot be used for the fonts of editor.

As a workaround if you still want to use the first font in collection, you can force to select all files (*).

@beicause beicause closed this Mar 22, 2025
@AThousandShips AThousandShips removed this from the 4.5 milestone Mar 22, 2025
@beicause beicause deleted the add-missing-font-file-filter branch March 22, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants