#include "lyxfont.h"
#include "FontLoader.h"
#include "font.h"
+#include "math_cursor.h"
#include "math_defs.h"
#include "math_inset.h"
#include "math_parser.h"
void mathed_init_fonts()
{
- MathFonts = new LyXFont[FONT_NUM]; //DEC cxx cannot initialize all fonts
- //at once (JMarc) rc
-
- for (int i = 0 ; i < FONT_NUM ; ++i) {
- MathFonts[i] = LyXFont(LyXFont::ALL_SANE);
- }
+ MathFonts = new LyXFont[FONT_NUM];
MathFonts[FONT_IT].setShape(LyXFont::ITALIC_SHAPE);
return MathFonts[1];
}
+
LyXFont const & whichFontBase(MathTextCodes type)
{
if (!MathFonts)
}
+void mathed_draw_framebox(Painter & pain, int x, int y, MathInset const * p)
+{
+ if (mathcursor && mathcursor->isInside(p))
+ pain.rectangle(x, y - p->ascent(), p->width(), p->height(),
+ LColor::mathframe);
+}
+
+
// In the future maybe we use a better fonts renderer
void drawStr(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
int x, int y, string const & s)
};
+char const * latex_mathstyle[] = {
+ "textstyle", "displaystyle", "scriptstyle", "scriptscriptstyle",
+ "mathbf", "mathcal","mathrm","mathtt", "mathsf", "mathit",
+ "mathbb","mathfrak", "textrm", "mathnormal"
+};
+
+
char const * math_font_name(MathTextCodes code)
{
static char const * theFontNames[] = {