mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
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:
@@ -105,7 +105,8 @@ void FontPickerController::openFontDialog( std::string& fontPath, bool loadingMo
|
||||
defaultResourceScope().publishLocalFont( std::move( fontName ), font );
|
||||
};
|
||||
|
||||
const Uint32 flags = ( pickFontSize ? UIFontPickerDialog::ShowSize : 0 ) |
|
||||
const Uint32 flags = UIFontPickerDialog::ShowStyle |
|
||||
( pickFontSize ? UIFontPickerDialog::ShowSize : 0 ) |
|
||||
( loadingMonoFont ? UIFontPickerDialog::MonospaceOnly : 0 );
|
||||
UIFontPickerDialog* dialog = UIFontPickerDialog::New( flags );
|
||||
dialog->setTitle( mApp->i18n( "select_font", "Select Font" ) );
|
||||
|
||||
Reference in New Issue
Block a user