]> git.lyx.org Git - lyx.git/blobdiff - src/Font.h
adjust
[lyx.git] / src / Font.h
index 5cde02900dd05cbb51e405e91b762ea8e02b37df..48258b97e5c53fc814bfe911470aad88673f4948 100644 (file)
 #ifndef FONT_H
 #define FONT_H
 
+#ifdef TEX2LYX
+#include "tex2lyx/Font.h"
+#else
+
 #include "Color.h"
 #include "support/docstream.h"
 
 
 namespace lyx {
 
-
 class Lexer;
 class BufferParams;
 class Language;
 class OutputParams;
 
-
 ///
 class Font {
 public:
@@ -298,18 +300,19 @@ public:
            font state active now.
        */
        int latexWriteStartChanges(odocstream &, BufferParams const & bparams,
-                                  OutputParams const & runparams,
-                                  Font const & base,
-                                  Font const & prev) const;
+                                  OutputParams const & runparams,
+                                  Font const & base,
+                                  Font const & prev) const;
 
        /** Writes the tail of the LaTeX needed to change to this font.
            Returns number of chars written. Base is the font state we want
            to achieve.
        */
        int latexWriteEndChanges(odocstream &, BufferParams const & bparams,
-                                OutputParams const & runparams,
-                                Font const & base,
-                                Font const & next) const;
+                                OutputParams const & runparams,
+                                Font const & base,
+                                Font const & next,
+                                bool const & closeLanguage = true) const;
 
 
        /// Build GUI description of font state
@@ -335,6 +338,11 @@ public:
                return bits.shape;
        }
 
+       /// Set \param data using \param font and \param toggle.
+       std::string toString(bool toggle) const;
+
+       /// Set \param font and \param toggle using \param data. Return success.
+       bool fromString(std::string const & data, bool & toggle);
 
        /** Compaq cxx 6.5 requires that the definition be public so that
            it can compile operator==()
@@ -418,7 +426,13 @@ bool operator!=(Font const & font1, Font const & font2)
        return !(font1 == font2);
 }
 
+/** Returns the current freefont, encoded as a std::string to be passed to the
+ *  frontends.
+ */
+std::string const freefont2string();
+
 
 } // namespace lyx
 
+#endif // TEX2LYX
 #endif