X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FFontLoader.h;h=20fe5b886ec2fffeaa8b8cc3b15f00e963e268e7;hb=8db4faa160d0785e6cecf6df5e450daded2e7733;hp=ea5cf7388bd2f7db40d5808f1a43041f0f370e64;hpb=205096733a808ba496550f3b74b40cb983a00642;p=lyx.git diff --git a/src/frontends/FontLoader.h b/src/frontends/FontLoader.h index ea5cf7388b..20fe5b886e 100644 --- a/src/frontends/FontLoader.h +++ b/src/frontends/FontLoader.h @@ -9,31 +9,43 @@ * Full author contact details are available in file CREDITS. */ -#ifndef LYX_FONTLOADER_H -#define LYX_FONTLOADER_H - -class LyXFont; +#ifndef FONTLOADER_H +#define FONTLOADER_H namespace lyx { + +class FontInfo; + namespace frontend { +class FontMetrics; + /// Hold info about a particular font class FontLoader { public: /// - FontLoader() {} - /// - virtual ~FontLoader() {} + FontLoader(); + /// Clears cache + ~FontLoader(); /// Update fonts after zoom, dpi, font names, or norm change - virtual void update() = 0; + // (basically by deleting all cached values) + void update(); /// Is the given font available ? - virtual bool available(LyXFont const & f) = 0; + bool available(FontInfo const & f); + + /// Get the Font metrics for this FontInfo + FontMetrics const & metrics(FontInfo const & f); }; + } // namespace frontend + +/// Implementation is in Application.cpp +extern frontend::FontLoader & theFontLoader(); + } // namespace lyx -#endif // QFONT_LOADER_H +#endif // FONTLOADER_H