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"
31 int mathed_char_width(FontInfo const &, char_type c);
33 int mathed_char_kerning(FontInfo const &, char_type c);
35 void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
36 docstring const & name);
38 void mathed_string_dim(FontInfo const & font,
42 int mathed_string_width(FontInfo const &, docstring const & s);
44 void metricsStrRedBlack(MetricsInfo & mi, Dimension & dim, docstring const & s);
46 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
47 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & s);
49 void math_font_max_dim(FontInfo const &, int & asc, int & desc);
51 void augmentFont(FontInfo & f, docstring const & cmd);
53 bool isFontName(docstring const & name);
55 bool isMathFont(docstring const & name);
57 bool isTextFont(docstring const & name);
59 // converts single cell to string
60 docstring asString(MathData const & ar);
61 // converts single inset to string
62 docstring asString(InsetMath const &);
63 docstring asString(MathAtom const &);
64 // converts string to single cell
65 void asArray(docstring const &, MathData &, Parse::flags f = Parse::NORMAL);