4 * Read the file COPYING
6 * \author Asger Alstrup
8 * Full author contact details are available in file CREDITS
24 /** This class takes care of loading fonts. It uses FontInfo to make
25 intelligent guesses about matching font size, and it tries different tags
26 itself in order to match the font loading demands. Later, I plan to extend
27 this with support for T1Lib, probably via a new class building on this.
37 /// Update fonts after zoom, dpi, font names, or norm change
41 XFontStruct * load(LyXFont::FONT_FAMILY family,
42 LyXFont::FONT_SERIES series,
43 LyXFont::FONT_SHAPE shape,
44 LyXFont::FONT_SIZE size) {
45 if (fontstruct[family][series][shape][size] != 0)
46 return fontstruct[family][series][shape][size];
48 return doLoad(family, series, shape, size);
50 /// Do we have anything matching?
51 bool available(LyXFont const & f);
54 /// Array of font structs
55 XFontStruct * fontstruct[LyXFont::NUM_FAMILIES][2][4][10];
57 /// Array of font infos
58 FontInfo * fontinfo[LyXFont::NUM_FAMILIES][2][4];
60 /// Reset font handler
67 void getFontinfo(LyXFont::FONT_FAMILY family,
68 LyXFont::FONT_SERIES series,
69 LyXFont::FONT_SHAPE shape);
71 /** Does the actual loading of a font. Updates fontstruct. */
72 XFontStruct * doLoad(LyXFont::FONT_FAMILY family,
73 LyXFont::FONT_SERIES series,
74 LyXFont::FONT_SHAPE shape,
75 LyXFont::FONT_SIZE size);
79 extern xfont_loader fontloader;