[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] alpha10 release?
From: |
Stéphane Magnenat |
Subject: |
Re: [glob2-devel] alpha10 release? |
Date: |
Thu, 16 Dec 2004 14:24:37 +0100 |
User-agent: |
KMail/1.7.1 |
On Thursday 16 December 2004 13.10, Hein-Pieter van Braam wrote:
> I think I got the last word of text doesn't wrap around bug (1.0 critical)
> nailed on the head.
>
> the problem is... bold characters are wider than non-bold characters, but
> due to the way that getStringWidth() and getStringHeight() where build, it
> always used the "normal" character rendering.
>
> I'm just committing, please have a look at it, I think I am correct in
> this, but you might be smarter than me :)
So you removed the Shape paramater from getStringWidth/Height() ?
Without it you have to do a pushStyle/getStyle to get the width of a string in
a given shape. This can potentially be a problem because the width depends on
Font::Shape and not on color (so not on Font::Style, which includes
Font::Shape and Color). We can keep the changes you did but we have to keep
this Font::Style/Font::Shape semi-confusion in mind. If we do so, we also
have to modify parts of libgag, for instance Text::paint where the
getStringWidth is done outside pushFontStyle/getFontStyle. Before it was no
problem, because getStringWidth took the shape as an argument. Now it is very
buggy because the wrong getStringWidth is called, the one with a length
argument, but the passed argument is the shape.
Please have a look at this. We can discuss it tonight. I'm not sure your
modification is the right way to solve the problem you addressed.
Steph