4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
22 #include <qfontmetrics.h>
24 #include <boost/scoped_ptr.hpp>
27 * Qt font loader for LyX. Matches LyXFonts against
28 * actual QFont instances, and also caches metrics.
36 /// update fonts after zoom, dpi, font names, or norm change
39 /// do we have anything matching?
40 bool available(LyXFont const & f);
42 /// get the QFont for this LyXFont
43 QFont const & get(LyXFont const & f);
45 /// get the QFont metrics for this LyXFont
46 QFontMetrics const & metrics(LyXFont const & f) {
47 return getfontinfo(f)->metrics;
50 /// hold info about a particular font
52 font_info(LyXFont const & f);
56 /// metrics on the font
60 /// get font info (font + metrics) for the given LyX font. Does not fail.
61 font_info const * getfontinfo(LyXFont const & f);
64 boost::scoped_ptr<font_info> fontinfo_[LyXFont::NUM_FAMILIES][2][4][10];
67 extern qfont_loader fontloader;
69 #endif // QFONT_LOADER_H