FontTrueType: Use the closed character size available when the requested is not available.

This commit is contained in:
Martín Lucas Golini
2022-02-05 01:17:51 -03:00
parent 50eb244f35
commit 619bf51a4d
3 changed files with 33 additions and 9 deletions

View File

@@ -179,7 +179,7 @@ void App::openFontDialog( std::string& fontPath ) {
std::string absoluteFontPath( fontPath );
if ( isRelativePath( absoluteFontPath ) )
absoluteFontPath = mResPath + fontPath;
UIFileDialog* dialog = UIFileDialog::New( UIFileDialog::DefaultFlags, "*.ttf; *.otf; *.wolff",
UIFileDialog* dialog = UIFileDialog::New( UIFileDialog::DefaultFlags, "*.ttf; *.otf; *.wolff; *.otb",
FileSystem::fileRemoveFileName( absoluteFontPath ) );
ModelIndex index = dialog->getMultiView()->getListView()->findRowWithText(
FileSystem::fileNameFromPath( fontPath ), true, true );