X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2FFont.h;h=b77ead7383a6e2a43cd37ee177c7ec779ba5b030;hb=f1cba8ff64b369792fd49f5ddf90e8126ab476ac;hp=d4ff29ee5c9e62acbe8f2b04b15ae46f61fb1755;hpb=fc6ce7cd08562fd7bab4427880b46390bb7d2f07;p=lyx.git diff --git a/src/tex2lyx/Font.h b/src/tex2lyx/Font.h index d4ff29ee5c..b77ead7383 100644 --- a/src/tex2lyx/Font.h +++ b/src/tex2lyx/Font.h @@ -14,30 +14,41 @@ * */ -#ifndef LYXFONT_H -#define LYXFONT_H +#ifndef TEX2LYX_FONT_H +#define TEX2LYX_FONT_H + +//#include "FontInfo.h" namespace lyx { class Lexer; -class Font { +class FontInfo +{ public: - /// Trick to overload constructor and make it megafast - enum FONT_INIT1 { ALL_INHERIT }; - enum FONT_INIT3 { ALL_SANE }; - - Font() {} - explicit Font(Font::FONT_INIT1) {} - explicit Font(Font::FONT_INIT3) {} + FontInfo() {} + FontInfo & realize(FontInfo const &) { return *this; } + void setColor(int) {} + bool resolved() const { return true; } +}; - Font & lyxRead(Lexer &); +/// Sane font. +extern FontInfo const sane_font; +/// All inherit font. +extern FontInfo const inherit_font; +/// All ignore font. +extern FontInfo const ignore_font; - Font & realize(Font const &) { return *this; } - bool resolved() const { return true; } +class Font +{ +public: + Font() {} + Font(FontInfo const &) {} }; +/// Read a font specification from Lexer. Used for layout files. +FontInfo lyxRead(Lexer &, FontInfo const & fi = sane_font); } // namespace lyx -#endif // NOT LYXFONT_H +#endif // TEX2LYX_FONT_H