4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATH_SUPPORT_H
14 #define MATH_SUPPORT_H
16 #include "MathParser_flags.h"
17 #include "support/strfwd.h"
32 int mathed_font_em(FontInfo const &);
34 int mathed_thinmuskip(FontInfo font);
36 int mathed_medmuskip(FontInfo font);
38 int mathed_thickmuskip(FontInfo font);
40 int mathed_char_width(FontInfo const &, char_type c);
42 int mathed_char_kerning(FontInfo const &, char_type c);
44 void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
45 docstring const & name);
47 void mathed_string_dim(FontInfo const & font,
51 int mathed_string_width(FontInfo const &, docstring const & s);
53 void mathedSymbolDim(MetricsBase & mb, Dimension & dim, latexkeys const * sym);
55 void mathedSymbolDraw(PainterInfo & pi, int x, int y, latexkeys const * sym);
57 void metricsStrRedBlack(MetricsInfo & mi, Dimension & dim, docstring const & s);
59 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
60 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & s);
62 void math_font_max_dim(FontInfo const &, int & asc, int & desc);
64 void augmentFont(FontInfo & f, std::string const & cmd);
66 bool isFontName(std::string const & name);
68 bool isMathFont(std::string const & name);
70 bool isTextFont(std::string const & name);
72 bool isAlphaSymbol(MathAtom const & at);
74 // converts single cell to string
75 docstring asString(MathData const & ar);
76 // converts single inset to string
77 docstring asString(InsetMath const &);
78 docstring asString(MathAtom const &);
79 // converts string to single cell
80 void asArray(docstring const &, MathData &, Parse::flags f = Parse::NORMAL);