X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFontLoader.h;h=66cd1c0503d7bae8104019361a3609b643f3e484;hb=98c966c64594611e469313314abd1e59524adb4a;hp=9ddd8e1f3ae233e579d8206685da8e20148da15c;hpb=0cf717d0c8ba3d766acb45c3adfcc0de1f3b79db;p=lyx.git diff --git a/src/FontLoader.h b/src/FontLoader.h index 9ddd8e1f3a..66cd1c0503 100644 --- a/src/FontLoader.h +++ b/src/FontLoader.h @@ -1,16 +1,16 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 1997 Asger Alstrup - * and the LyX Team. + * and the LyX Team. * * ====================================================== */ #ifndef FONTLOADER_H_ -#define FONTLOADER_H_ +#define FONTLOADER_H_ #ifdef __GNUG__ #pragma interface @@ -22,10 +22,10 @@ class FontInfo; -/** This class takes care of loading fonts. It uses FontInfo to make -intelligent guesses about matching font size, and it tries different tags -itself in order to match the font loading demands. Later, I plan to extend -this with support for T1Lib, probably via a new class building on this. +/** This class takes care of loading fonts. It uses FontInfo to make +intelligent guesses about matching font size, and it tries different tags +itself in order to match the font loading demands. Later, I plan to extend +this with support for T1Lib, probably via a new class building on this. (Asger) */ class FontLoader { public: @@ -39,9 +39,9 @@ public: void update(); /// Load font - XFontStruct * load(LyXFont::FONT_FAMILY family, - LyXFont::FONT_SERIES series, - LyXFont::FONT_SHAPE shape, + XFontStruct * load(LyXFont::FONT_FAMILY family, + LyXFont::FONT_SERIES series, + LyXFont::FONT_SHAPE shape, LyXFont::FONT_SIZE size) { if (fontstruct[family][series][shape][size] != 0) return fontstruct[family][series][shape][size]; @@ -50,13 +50,13 @@ public: }; /// Do we have anything matching? bool available(LyXFont const & f); - + private: /// Array of font structs - XFontStruct * fontstruct[9][2][4][10]; + XFontStruct * fontstruct[LyXFont::NUM_FAMILIES][2][4][10]; /// Array of font infos - FontInfo * fontinfo[9][2][4]; + FontInfo * fontinfo[LyXFont::NUM_FAMILIES][2][4]; /// Reset font handler void reset(); @@ -65,14 +65,14 @@ private: void unload(); /// Get font info - void getFontinfo(LyXFont::FONT_FAMILY family, - LyXFont::FONT_SERIES series, + void getFontinfo(LyXFont::FONT_FAMILY family, + LyXFont::FONT_SERIES series, LyXFont::FONT_SHAPE shape); /** Does the actual loading of a font. Updates fontstruct. */ - XFontStruct * doLoad(LyXFont::FONT_FAMILY family, - LyXFont::FONT_SERIES series, - LyXFont::FONT_SHAPE shape, + XFontStruct * doLoad(LyXFont::FONT_FAMILY family, + LyXFont::FONT_SERIES series, + LyXFont::FONT_SHAPE shape, LyXFont::FONT_SIZE size); };