> but now whenever I 
> try to run a
> Gnome application or switch to Gnome as window manager I get dotted
> rectangles where there should be text so e.g. it's 
> impossible to configure a
> printer.

There's a bug in Gtk+ at work here, and it's revealed by a change in 
XFree86 that has been adjusted to compensate.

The problem is in how fonts are matched in X.  The XLFD requires that 
the X server return the first font which matches the application pattern.
Many gnome applications specify '*-*' for the font encoding.  It used to be
that XFree86 returned the font using the ISO8859-1 encoding first in the 
list, so '*-*' would match ISO8859-1 and applications would see their 
expected Latin-1 encoding. 

When XFree86 added Unicode encodings for these same fonts, applications
would no longer get ISO8859-1 but would get ISO10646-1 instead.  That's
because XFree86 sorted the fonts in lexicographic order and ISO10646-1
comes before ISO8859-1.

Now, normally this would "just work", after all ISO10646-1 is identical to
ISO8859-1 for the first 256 characters, but the ISO10646-1 fonts include 
many more than 256 glyphs.

Whenever Gtk+ applications see fonts that have more than 256 glyphs, they 
"assume" they're dealing with Asian fonts and application interfaces which 
used to take just one byte for each character now consume two bytes
for each character on the screen.  This is clearly a bug, but not one that 
can be fixed easily -- every application would need to be fixed to tell 
the library how many bytes were in each character.

We "fixed" XFree86 by changing the order it returns fonts; instead of 
using a lexicogrpahic order, we use a semi-numeric ordering -- sequences 
of digits are sorted in numeric order while the other glyphs are sorted in 
lexicographic order.  This makes XFree86 return ISO8859-1 *before* 
ISO10646-1, gives Gtk+ an 8-bit font and suddenly the Gtk+ code starts 
working again.

As this same code appears in both the X server and the X font server, you 
need to make sure both of them are running the modified code for Gtk+ to 
work correctly.  Either that, or you can eliminate the X font server from 
your X server font path.

[EMAIL PROTECTED]        XFree86 Core Team              SuSE, Inc.


_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to