Encoding const * encoding = f.language()->encoding();
//LyXFont const * font = &f;
LyXFont font(f);
- if (f.family() == LyXFont::SYMBOL_FAMILY) {
+ if (f.isSymbolFont()) {
#ifdef USE_UNICODE_FOR_SYMBOLS
//LyXFont font2 = f;
font.setFamily(LyXFont::ROMAN_FAMILY);
void lyxfont::buttonText(string const & str, LyXFont const & font,
int & width, int & ascent, int & descent)
{
- width = lyxfont::width(str, font) + 8;
- ascent = lyxfont::maxAscent(font) + 3;
- descent = lyxfont::maxDescent(font) + 3;
+ static int const d = 3;
+
+ width = lyxfont::width(str, font) + d * 2 + 2;
+ ascent = lyxfont::maxAscent(font) + d;
+ descent = lyxfont::maxDescent(font) + d;
}