Re: [PATCH to 1.2.8] gdk_text_width_wc was broked
- From: Vlad Harchev <hvv hippo ru>
- To: gtk-devel-list gnome org
- Subject: Re: [PATCH to 1.2.8] gdk_text_width_wc was broked
- Date: Sun, 31 Dec 2000 15:58:07 +0400 (SAMT)
On 30 Dec 2000, Owen Taylor wrote:
Hello Owen,
I'm sorry if I sounded rude and probably offensive. I just want to help
making gtk+ the best toolkit.
>
> - Have we released 1.2.9 yet? No. Is the product the CVS repository?
> No.
>
> - Is GTK+ supposed to work for non iso-8859-1 character sets without
> using the Xlib internationalization support (and font sets)? No.
Xlib works fine without involving fontsets for single byte encodings - the
use of fontsets for single byte encodings seems not to improve things at all
from a principal POV. XTextWidth is guaranteed to work with 8 bit strings, not
with iso-8859-1 strings.
> - Does your patch work for all languages? No. It's not even close
> for Japanese, en_US.utf8, etc.
But it fixes the problem for all single-byte encodings, e.g. encodings of
Cyrillic, Greek, and other encodings of other East Europe languages. Yes, it
doesn't solve the problem for multibyte encodings - but fontsets are a usual
thing for multibyte encoding users.
> - Does your patch improve things? Well, it may make an unsupported
> corner case work marginally better.
Applying this 10-line patch makes non-latin1 singlebyte encodings supported
(without requiring to use fontsets) in full by gtk-1.2.x. It's a definite
improvement - it makes that unsupported corner case supported. And by
all means it doesn't break anything.
> - Did I forget about the patch? Of course not.
> I will decide whether to to apply your patch before we release
> 1.2.9. I expect I will apply it, since it probably doesn't actually
> break anything, and GTK+-2.0 ditches this whole mess anyway.
Please apply it by the release of 1.2.9.
Thank you very much in advance.
Happy New Millenium to gtk+!
> Regards,
> Owen
>
> Vlad Harchev <hvv hippo ru> writes:
>
> > On Tue, 22 Aug 2000, Vlad Harchev wrote:
> >
> > Guys, why don't you apply this patch to 1.2 branch? It's a bugfix, and should
> > go in. I'm asking you to allow applying it since 22 Aug. Shame to you!
> >
> >
> > > Hi,
> > >
> > > Here is a patch to fix broken behaviour of gdk_text_width_wc. If the font
> > > passed to it is of type GDK_FONT_FONT (i.e. not a fontset) it converts wcs
> > > to char[] using plain assignment, rather than using gdk_wcstombs). This breaks
> > > horribly for russian strings - the characters get shifted by 128 after such
> > > conversion, thus leading to measuring the width of completely different string
> > > (it always shorter, so all strings in russian appear truncated by a half of a
> > > letter in average).
> > >
> > > Best regards,
> > > -Vlad
Best regards,
-Vlad
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]