Fix external font handling in UIFontPickerDialog

Preserve explicitly selected font styles and correctly reconcile external fonts with the asynchronously loaded system font list.

Group same-family external fonts under the Style column when styles are visible, and expose them as distinct family entries when styles are hidden. Include filenames in localized external-font labels to distinguish alternate
font versions.

Ensure system-listed regular faces remain available after asynchronous loading and add regression coverage for collisions, selection, and hidden style behavior.
This commit is contained in:
Martín Lucas Golini
2026-08-14 13:52:55 -03:00
parent f8cef977d6
commit 1b901eaa02
8 changed files with 179 additions and 29 deletions
@@ -220,6 +220,9 @@ class EE_API UIFontPickerDialog : public UIWindow {
void browseFont();
bool addExternalFont( const std::string& path, Uint32 faceIndex = 0 );
bool isExternalFont( const FontDesc& font ) const;
std::string externalTag( const FontDesc& font, bool includeFileName );
bool familyEntryMatchesFont( const FontFamilyEntry& family, const FontDesc& font ) const;
void clearBrowseDialog();