From aa32bf2dcbf241e30844d08348e774ea3f66ed55 Mon Sep 17 00:00:00 2001 From: Dekel Tsur Date: Wed, 19 Sep 2001 16:36:39 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 5 +++++ src/FontLoader.C | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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(); } -- 2.39.2