mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix thinkos in LaTeX font reading
This commit is contained in:
parent
e36e46b335
commit
719ec62e28
@ -394,8 +394,14 @@ LaTeXFonts::TexFontMap LaTeXFonts::getLaTeXFonts()
|
||||
|
||||
LaTeXFont LaTeXFonts::getLaTeXFont(docstring const & name)
|
||||
{
|
||||
if (name == "default")
|
||||
return LaTeXFont();
|
||||
if (texfontmap_.empty())
|
||||
readLaTeXFonts();
|
||||
if (texfontmap_.find(name) == texfontmap_.end()) {
|
||||
LYXERR0("LaTeXFonts::getLaTeXFont: font '" << name << "' not found!");
|
||||
return LaTeXFont();
|
||||
}
|
||||
return texfontmap_[name];
|
||||
}
|
||||
|
||||
|
@ -1840,8 +1840,10 @@ void GuiDocument::updateTexFonts()
|
||||
LaTeXFonts::TexFontMap::const_iterator end = texfontmap.end();
|
||||
for (; it != end; ++it) {
|
||||
LaTeXFont lf = it->second;
|
||||
if (lf.name().empty())
|
||||
return;
|
||||
if (lf.name().empty()) {
|
||||
LYXERR0("Error: Unnamed font: " << it->first);
|
||||
continue;
|
||||
}
|
||||
docstring const family = lf.family();
|
||||
docstring guiname = translateIfPossible(lf.guiname());
|
||||
if (!lf.available(ot1()))
|
||||
|
Loading…
Reference in New Issue
Block a user