From: Dekel Tsur Date: Wed, 19 Sep 2001 16:36:39 +0000 (+0000) Subject: Check if font is available without loading the font. X-Git-Tag: 1.6.10~20585 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=aa32bf2dcbf241e30844d08348e774ea3f66ed55;p=features.git Check if font is available without loading the font. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2771 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index a8712eaa4f..ea98b1d651 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-09-19 Dekel Tsur + + * FontLoader.C (available): Check if font is available without + loading the font. + 2001-09-13 Angus Leeming * lyxrc.[Ch]: added display_graphics variable and associated code. diff --git a/src/FontLoader.C b/src/FontLoader.C index aeaf96c805..273aab3910 100644 --- a/src/FontLoader.C +++ b/src/FontLoader.C @@ -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(); }