On Mon, Sep 10, 2007 at 10:42:32PM +0200, Andre Poenitz wrote: > On Mon, Sep 10, 2007 at 10:44:01PM +0300, Martin Vermeer wrote: > > OK for trunk? > > > Index: src/mathed/InsetMathFrac.cpp > > =================================================================== > > --- src/mathed/InsetMathFrac.cpp (revision 20193) > > +++ src/mathed/InsetMathFrac.cpp (working copy) > > @@ -48,9 +48,10 @@ > > bool InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const > > { > > FracChanger dummy(mi.base); > > + ShapeChanger dummy2(mi.base.font, Font::UP_SHAPE); > > This means the metrics for all fractions are based on UP_SHAPE?
Oops... good catch. > > cell(0).metrics(mi); > > cell(1).metrics(mi); > > - if (kind_ == NICEFRAC) { > > + if (kind_ == NICEFRAC || kind_ == UNITFRAC) { > > dim.wid = cell(0).width() + cell(1).width() + 5; > > dim.asc = cell(0).height() + 5; > > dim.des = cell(1).height() - 5; > > @@ -72,7 +73,8 @@ > > setPosCache(pi, x, y); > > int m = x + dim_.wid / 2; > > FracChanger dummy(pi.base); > > - if (kind_ == NICEFRAC) { > > + ShapeChanger dummy2(pi.base.font, Font::UP_SHAPE); > > + if (kind_ == NICEFRAC || kind_ == UNITFRAC) { > > And NICEFRAC and UNITFRAC are drawn as such? Another problem I'm not sure about is whether to use nicefrac, units, or both. Easiest probably to just use units always. - Martin