]> git.lyx.org Git - features.git/commitdiff
Check if font is available without loading the font.
authorDekel Tsur <dekelts@tau.ac.il>
Wed, 19 Sep 2001 16:36:39 +0000 (16:36 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Wed, 19 Sep 2001 16:36:39 +0000 (16:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2771 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/FontLoader.C

index a8712eaa4f5e5626b58ab184949fcd90e2ee788f..ea98b1d6514e6e51a3074cf56b87e9017629431d 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-19  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * FontLoader.C (available): Check if font is available without
+       loading the font.
+
 2001-09-13  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * lyxrc.[Ch]: added display_graphics variable and associated code.
index aeaf96c805c42932955184a634b1f464567b7b6d..273aab391029d1bbff6be2f8b632d2f5f09d4f1e 100644 (file)
@@ -325,7 +325,9 @@ bool FontLoader::available(LyXFont const & f)
 {
        if (!lyxrc.use_gui)
                return false;
-       load(f.family(), f.series(), f.realShape(), f.size());
+
+       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();
 }