-
- setDimCache(mi, dim);
-}
-
-
-namespace {
-
-void drawLogo(PainterInfo & pi, InsetSpecialChar::Kind kind, int & x, int & y) {
- FontInfo const & font = pi.base.font;
- // FIXME: this definition of em is bogus, but there is a need
- // for a big refactoring of the code around this issue anyway.
- double const em = theFontMetrics(font).width('M');
- switch (kind) {
- case InsetSpecialChar::PHRASE_LYX:
- x += pi.pain.text(x, y, from_ascii("L"), font);
- x -= 0.16667 * em;
- x += pi.pain.text(x, y + 0.25 * em, from_ascii("Y"), font);
- x -= 0.125 * em;
- x += pi.pain.text(x, y, from_ascii("X"), font);
- break;
-
- case InsetSpecialChar::PHRASE_TEX:
- x += pi.pain.text(x, y, from_ascii("T"), font);
- x -= 0.16667 * em;
- x += pi.pain.text(x, y + 0.25 * em, from_ascii("E"), font);
- x -= 0.125 * em;
- x += pi.pain.text(x, y, from_ascii("X"), font);
- break;
-
- case InsetSpecialChar::PHRASE_LATEX2E:
- drawLogo(pi, InsetSpecialChar::PHRASE_LATEX, x, y);
- x += pi.pain.text(x, y, from_ascii("2"), font);
- x += pi.pain.text(x, y + 0.25 * em, char_type(0x03b5), font);
- break;
-
- case InsetSpecialChar::PHRASE_LATEX: {
- x += pi.pain.text(x, y, from_ascii("L"), font);
- x -= 0.36 * em;
- FontInfo smaller = font;
- smaller.decSize().decSize();
- x += pi.pain.text(x, y - 0.2 * em, from_ascii("A"), smaller);
- x -= 0.15 * em;
- drawLogo(pi, InsetSpecialChar::PHRASE_TEX, x, y);
- break;
- }
- default:
- LYXERR0("No information for drawing logo " << kind);
- }