4 * Copyright 1997 the LyX Team
5 * Read the file COPYING
7 * \author John Levon <moz@compsoc.man.ac.uk>
18 #include <boost/smart_ptr.hpp>
25 #include <qfontmetrics.h>
28 * Qt font loader for LyX. Matches LyXFonts against
29 * actual QFont instances, and also caches metrics.
37 /// update fonts after zoom, dpi, font names, or norm change
40 /// do we have anything matching?
41 bool available(LyXFont const & f);
43 /// get the QFont for this LyXFont
44 QFont const & get(LyXFont const & f) {
45 return getfontinfo(f)->font;
48 /// get the QFont metrics for this LyXFont
49 QFontMetrics const & metrics(LyXFont const & f) {
50 return getfontinfo(f)->metrics;
54 /// hold info about a particular font
56 font_info(LyXFont const & f);
60 /// metrics on the font
64 /// get font info (font + metrics) for the given LyX font. Does not fail.
65 font_info const * getfontinfo(LyXFont const & f);
68 boost::scoped_ptr<font_info> fontinfo_[LyXFont::NUM_FAMILIES][2][4][10];
71 extern qfont_loader fontloader;
73 #endif // QFONT_LOADER_H