]> git.lyx.org Git - lyx.git/blobdiff - src/FontLoader.C
get rid of LYX_LIBS
[lyx.git] / src / FontLoader.C
index d45e58949e30061a90de31bb2cd67f471142b395..b75d165e914871833756749a7fcd2330ac5b846c 100644 (file)
@@ -108,37 +108,42 @@ void FontLoader::getFontinfo(LyXFont::FONT_FAMILY family,
        {
                case LyXFont::SYMBOL_FAMILY:
                        fontinfo[family][series][shape] =
-                               new FontInfo("-*-symbol-*-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-symbol-*-*-*-*-*-*-*-*-*-*-adobe-fontspecific");
                        return;
 
                case LyXFont::CMR_FAMILY:
                        fontinfo[family][series][shape] =
-                               new FontInfo("-*-cmr-medium-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-cmr10-medium-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
                case LyXFont::CMSY_FAMILY:
                        fontinfo[family][series][shape] =
-                               new FontInfo("-*-cmsy-*-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-cmsy10-*-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
                case LyXFont::CMM_FAMILY:
                        fontinfo[family][series][shape] =
-                               new FontInfo("-*-cmmi-medium-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-cmmi10-medium-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
                case LyXFont::CMEX_FAMILY:
                        fontinfo[family][series][shape] =
-                               new FontInfo("-*-cmex-*-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-cmex10-*-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
                case LyXFont::MSA_FAMILY:
                        fontinfo[family][series][shape] =
-                               new FontInfo("-*-msam-*-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-msam10-*-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
                case LyXFont::MSB_FAMILY:
                        fontinfo[family][series][shape] = 
-                               new FontInfo("-*-msbm-*-*-*-*-*-*-*-*-*-*-*-*");
+                               new FontInfo("-*-msbm10-*-*-*-*-*-*-*-*-*-*-*-*");
+                       return;
+
+               case LyXFont::EUFRAK_FAMILY:
+                       fontinfo[family][series][shape] = 
+                               new FontInfo("-*-eufm10-medium-*-*-*-*-*-*-*-*-*-*-*");
                        return;
 
                default:
@@ -274,8 +279,8 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
        }
 
        getFontinfo(family, series, shape);
-       int fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi * 
-                         (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );
+       int fsize = int((lyxrc.font_sizes[size] * lyxrc.dpi * 
+                         (lyxrc.zoom/100.0)) / 72.27 + 0.5);
 
        string font = fontinfo[family][series][shape]->getFontname(fsize);
 
@@ -323,7 +328,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();
 }