]> git.lyx.org Git - lyx.git/blobdiff - src/Painter.C
Improved support for docbook export in inset text.
[lyx.git] / src / Painter.C
index 8c731244c3399dc931da2be62255c8781f873254..7726af8365595f21c12e09335825bd8eef640cde 100644 (file)
@@ -266,7 +266,7 @@ PainterBase & Painter::image(int x, int y, int w, int h, LyXImage const * image)
 
 PainterBase & Painter::text(int x, int y, string const & s, LyXFont const & f)
 {
-       return text(x, y, s.c_str(), s.length(), f);
+       return text(x, y, s.data(), s.length(), f);
 }
 
 
@@ -284,7 +284,7 @@ PainterBase & Painter::text(int x, int y, char const * s, size_t ls,
                XChar2b * xs = new XChar2b[ls];
                Encoding const * encoding = f.language()->encoding();
                LyXFont font(f);
-               if (f.family() == LyXFont::SYMBOL_FAMILY) {
+               if (f.isSymbolFont()) {
 #ifdef USE_UNICODE_FOR_SYMBOLS
                        font.setFamily(LyXFont::ROMAN_FAMILY);
                        font.setShape(LyXFont::UP_SHAPE);
@@ -332,12 +332,11 @@ PainterBase & Painter::text(int x, int y, char const * s, size_t ls,
                        }
                }
        }
-       if (f.underbar() == LyXFont::ON
-#ifndef NO_LATEX
-           && f.latex() != LyXFont::ON
-#endif
-               )
+
+       if (f.underbar() == LyXFont::ON) {
                underline(f, x, y, lyxfont::width(s, ls, f));
+       }
+       
        return *this;
 }
 
@@ -375,12 +374,11 @@ PainterBase & Painter::text(int x, int y, XChar2b const * s, int ls,
                        }
                }
        }
-       if (f.underbar() == LyXFont::ON
-#ifndef NO_LATEX
-           && f.latex() != LyXFont::ON
-#endif
-               )
+       
+       if (f.underbar() == LyXFont::ON) {
                underline(f, x, y, lyxfont::width(s, ls, f));
+       }
+       
        return *this;
 }