Attached a patch to make the CharStyle inset honour the font in the
.layout file again.

This should bring back the original functionality that was lost with
one of (André's?) cleanup patches that removed getDrawFont() from the
text?.C files. Michael, if this doesn't collide with what you're doing
I would like to check this in. 

- Martin

-- 
Martin Vermeer  [EMAIL PROTECTED]
Helsinki University of Technology 
Dept. of Surveying, Inst. of Geodesy
P.O. Box 1200, FIN-02015 HUT, Finland
:wq
Index: insetcharstyle.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcharstyle.C,v
retrieving revision 1.9
diff -u -p -r1.9 insetcharstyle.C
--- insetcharstyle.C    12 Dec 2003 14:02:14 -0000      1.9
+++ insetcharstyle.C    15 Dec 2003 18:56:21 -0000
@@ -93,7 +93,10 @@ void InsetCharStyle::read(Buffer const &
 
 void InsetCharStyle::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       LyXFont tmpfont = mi.base.font;
+       getDrawFont(mi.base.font);
        InsetCollapsable::metrics(mi, dim);
+       mi.base.font = tmpfont;
        dim_ = dim;
        if (has_label_)
                dim_.des += ascent();
@@ -106,8 +109,11 @@ void InsetCharStyle::draw(PainterInfo & 
        yo_ = y;
 
        // FIXME: setStatus(Inlined); this is not a const operation
+       LyXFont tmpfont = pi.base.font;
        inset.setDrawFrame(InsetText::NEVER);
+       getDrawFont(pi.base.font);
        inset.draw(pi, x, y);
+       pi.base.font = tmpfont;
 
        pi.pain.line(x + 2, y + inset.descent() - 4, x + 2,
                y + inset.descent(), params_.labelfont.color());

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to