X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FFontLoader.h;h=e876e7820030b3d3bf1b5ac04bf9ceb1c5f50615;hb=c0a1893008bd13650d470afff16f56720b65c87c;hp=f6b60043f62f850977ac946813baac24f6684400;hpb=31334d39348282d4586eb82b9bb5e91f03018542;p=lyx.git diff --git a/src/frontends/FontLoader.h b/src/frontends/FontLoader.h index f6b60043f6..e876e78200 100644 --- a/src/frontends/FontLoader.h +++ b/src/frontends/FontLoader.h @@ -9,12 +9,14 @@ * Full author contact details are available in file CREDITS. */ -#ifndef LYX_FONTLOADER_H -#define LYX_FONTLOADER_H +#ifndef FONTLOADER_H +#define FONTLOADER_H + +#include "support/strfwd.h" namespace lyx { -class LyXFont; +class FontInfo; namespace frontend { @@ -25,18 +27,22 @@ 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); + + /// Can the given symbol be displayed in general? + bool canBeDisplayed(char_type c); - /// Get the Font metrics for this LyXFont - virtual FontMetrics const & metrics(LyXFont const & f) = 0; + /// Get the Font metrics for this FontInfo + FontMetrics const & metrics(FontInfo const & f); }; @@ -47,4 +53,4 @@ extern frontend::FontLoader & theFontLoader(); } // namespace lyx -#endif // QFONT_LOADER_H +#endif // FONTLOADER_H