]> git.lyx.org Git - lyx.git/blobdiff - src/FontLoader.C
write \mathrm{x}\mathrm{y} as \mathrm{xy} again
[lyx.git] / src / FontLoader.C
index d45e58949e30061a90de31bb2cd67f471142b395..273aab391029d1bbff6be2f8b632d2f5f09d4f1e 100644 (file)
@@ -323,7 +323,11 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
 
 bool FontLoader::available(LyXFont const & f)
 {
-       load(f.family(), f.series(), f.realShape(), f.size());
+       if (!lyxrc.use_gui)
+               return false;
+
+       if (!fontinfo[f.family()][f.series()][f.realShape()])
+               getFontinfo(f.family(), f.series(), f.realShape());
        return fontinfo[f.family()][f.series()][f.realShape()]
                ->getFontname(f.size()).size();
 }