gdk and fonts


Subject: gdk and fonts
From: WJCarpenter (bill-abisource@carpenter.ORG)
Date: Fri Jun 30 2000 - 17:39:35 CDT


Tough news on the fonts front. The gdk text/font routines seem to
have some kind of problem with wide characters and the fonts we use,
although the APIs look like AbiWord is doing the right thing. Fonts
loaded in AbiWord get typed as GDK_FONT_FONT (as opposed to
GDK_FONT_FONTSET; I haven't looked into the difference). The routines
which tell callers about the widths of strings or characters as if the
thing being asked about is an 8bit entity (e.g., gdk_char_width_wc()
masks the character sent in with 0xFF).

So, the net result is that a 0x2043 character will be treated as
0x0043. I haven't traced through the gdk text drawing code to verify
that the same thing happens there as in the width code, but since what
I see on the screen is consistent with that, my bet is that it has the
same problem.

It's kind of disappointing that they go to the trouble of defining
wide character forms of the functions and then actively get it wrong.
I will address this in AbiWord in a patch in a few days when the dust
from my smart quote patch has settled.

Anyone around here in touch with the GTK folks and able to send them a
bug report? If not, I'll figure that out someday. (There are
comments in the code arguably about this, but perhaps it's not being
tracked as a bug in GTK-land.)

-- 
bill@carpenter.ORG (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3



This archive was generated by hypermail 2b25 : Fri Jun 30 2000 - 17:41:29 CDT