Jürgen Spitzmüller wrote:
Abdelrazak Younes wrote:
It's even worse than I thought (there's a user report about this). I
have to admit I never used charstyles with 1.5.x; obviously I should
have tested it (and I am sorry for that Juergen) but I am amazed that
nobody noticed that before the release. Nobody's using charstyles around
here?
I'm using char styles, but for some reason I didn't notice the problem either.
So you're not the (only) one to blame.
Do you see a solution?
Here is the patch. Please commit it yourself as I have to go. I suggest
a 1.5.4 release ASAP.
Abdel.
Index: InsetCharStyle.cpp
===================================================================
--- InsetCharStyle.cpp (revision 22238)
+++ InsetCharStyle.cpp (working copy)
@@ -144,7 +144,6 @@
getDrawFont(mi.base.font);
mi.base.font.reduce(Font(Font::ALL_SANE));
mi.base.font.realize(tmpfont);
- mi.base.textwidth -= 2 * TEXT_TO_INSET_OFFSET;
InsetText::metrics(mi, dim);
mi.base.font = tmpfont;
if (params_.show_label) {
@@ -163,8 +162,6 @@
theFontMetrics(font).rectText(s, w, a, d);
dim.wid = max(dim.wid, w);
}
- dim.wid += 2 * TEXT_TO_INSET_OFFSET;
- mi.base.textwidth += 2 * TEXT_TO_INSET_OFFSET;
if (params_.show_label)
dim.des += ascent();
bool const changed = dim_ != dim;
@@ -181,7 +178,7 @@
getDrawFont(pi.base.font);
// I don't understand why the above .reduce and .realize aren't
//needed, or even wanted, here. It just works. -- MV 10.04.2005
- InsetText::draw(pi, x + TEXT_TO_INSET_OFFSET, y);
+ InsetText::draw(pi, x, y);
pi.base.font = tmpfont;
int desc = InsetText::descent();