X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2FFont.h;h=b77ead7383a6e2a43cd37ee177c7ec779ba5b030;hb=ac6e5b871c934b853c775b1bbdf73a06df4ce5bd;hp=e9335593cc6e5a10e4b44eca5af67114058e364e;hpb=9d711c62fc352193ef2873000b872ebd203143f3;p=lyx.git diff --git a/src/tex2lyx/Font.h b/src/tex2lyx/Font.h index e9335593cc..b77ead7383 100644 --- a/src/tex2lyx/Font.h +++ b/src/tex2lyx/Font.h @@ -17,26 +17,37 @@ #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