- enum FONT_SIZE {
- ///
- SIZE_TINY, // fontstruct rely on this to be 0
- ///
- SIZE_SCRIPT,
- ///
- SIZE_FOOTNOTE,
- ///
- SIZE_SMALL,
- ///
- SIZE_NORMAL,
- ///
- SIZE_LARGE,
- ///
- SIZE_LARGER,
- ///
- SIZE_LARGEST,
- ///
- SIZE_HUGE,
- ///
- SIZE_HUGER,
- ///
- INCREASE_SIZE,
- ///
- DECREASE_SIZE,
- ///
- INHERIT_SIZE,
- ///
- IGNORE_SIZE
- };
-
- /// Used for emph, underbar, noun and latex toggles
- enum FONT_MISC_STATE {
- ///
- OFF,
- ///
- ON,
- ///
- TOGGLE,
- ///
- INHERIT,
- ///
- IGNORE
- };
-
- /// Trick to overload constructor and make it megafast
- enum FONT_INIT1 {
- ///
- ALL_INHERIT
- };
- ///
- enum FONT_INIT2 {
- ///
- ALL_IGNORE
- };
- ///
- enum FONT_INIT3 {
- ///
- ALL_SANE
- };
-
- struct FontBits {
- ///
- FONT_FAMILY family;
- ///
- FONT_SERIES series;
- ///
- FONT_SHAPE shape;
- ///
- FONT_SIZE size;
- /** We store the Color::color value as an int to get Color.h out
- * of the header file.
- */
- int color;
- ///
- FONT_MISC_STATE emph;
- ///
- FONT_MISC_STATE underbar;
- ///
- FONT_MISC_STATE noun;
- ///
- FONT_MISC_STATE number;
- };
- ///
- Font();
-
- /// Shortcut initialization
- explicit Font(Font::FONT_INIT1);
- /// Shortcut initialization
- explicit Font(Font::FONT_INIT2);
- /// Shortcut initialization
- explicit Font(Font::FONT_INIT3);
- /// Shortcut initialization
- Font(Font::FONT_INIT1, Language const * l);
- /// Shortcut initialization
- Font(Font::FONT_INIT2, Language const * l);
- /// Shortcut initialization
- Font(Font::FONT_INIT3, Language const * l);
-
- /// Decreases font size by one
- Font & decSize();
- /// Increases font size by one
- Font & incSize();
- ///
- FONT_FAMILY family() const { return bits.family; }
- ///
- FONT_SERIES series() const { return bits.series; }
- ///
- FONT_SHAPE shape() const { return bits.shape; }
- ///
- FONT_SIZE size() const { return bits.size; }