Fixup logic in LaTeXFonts::getUsedFont()

Allow for unavailable switchdefault fonts fall back to AltFonts

Prerequisite to implement #13124

(cherry picked from commit 833c372931)
This commit is contained in:
Juergen Spitzmueller 2024-11-13 09:02:49 +01:00
parent 4659e4c716
commit 2a60f32780

View File

@ -199,7 +199,8 @@ docstring const LaTeXFont::getUsedFont(bool ot1, bool complete, bool nomath, boo
&& altfonts_.empty()) { && altfonts_.empty()) {
return name_; return name_;
} }
else if (!altfonts_.empty()) { // if we haven't somethin up to here, try fallback fonts
if (!altfonts_.empty()) {
for (auto const & name : altfonts_) { for (auto const & name : altfonts_) {
LaTeXFont altf = altFont(name); LaTeXFont altf = altFont(name);
if (altf.available(ot1, nomath)) if (altf.available(ot1, nomath))