]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSpecialChar.cpp
Limit ligature protection to quote ligature chars
[lyx.git] / src / insets / InsetSpecialChar.cpp
index 6554cce16e552078a3ad0d01bde208333c01a01f..462620532b463b800befefa39e466719f07c5466 100644 (file)
@@ -129,18 +129,6 @@ void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
        }
        if (dim.wid == 0)
                dim.wid = fm.width(s);
-
-       setDimCache(mi, dim);
-}
-
-
-void InsetSpecialChar::drawBackground(PainterInfo & pi, int x, int y) const
-{
-       if (pi.full_repaint)
-               return;
-       Dimension const dim = dimension(*pi.base.bv);
-       pi.pain.fillRectangle(x, y - dim.asc, dim.wid, dim.asc + dim.des,
-                             pi.backgroundColor(this));
 }
 
 
@@ -149,8 +137,10 @@ namespace {
 // helper function: draw text and update x.
 void drawChar(PainterInfo & pi, int & x, int const y, char_type ch)
 {
-       pi.pain.text(x, y, ch, pi.base.font);
-       x += theFontMetrics(pi.base.font).width(ch);
+       FontInfo font = pi.base.font;
+       font.setPaintColor(pi.textColor(font.realColor()));
+       pi.pain.text(x, y, ch, font);
+       x += theFontMetrics(font).width(ch);
 }