[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 16 bit font issues



JB> I have a bug report (109488) about certain text widgets (gtk) being
JB> garbled.  The questioner believes that this is due to certain fonts
JB> being requested without giving an encoding preference (just "-*-"),
JB> and a 16 bit font being returned where the client program is expecting 
JB> an 8 bit font.

JB> I also see a similar program in some other gtk programs: e.g. Galeon,
JB> at some font sizes only, and Pan.

JB> Is the diagnosis correct?

110% correct.  This problem is really a bug in Gtk+ which was
triggered by the inclusion of Unicode-encoded fonts in XFree86 4.
(Fonts ending in ``-iso10646-1.'')

(Congratulations to the submitter for the detective work.  The core
fonts system of X11 is truly incomprehensible; thankfully all of that
will go away when clients switch to using the RENDER extension for all
text display.  By the way, xfontsel was fixed to deal with Unicode
fonts a long time ago -- I'm surprised you still have problems.)

JB> Is it worth trying to fix 'centrally' (e.g. by ensuring that
JB> requests with unspecified encoding always return an 8-bit encoding
JB> of some kind),

A workaround (due to Keith Packard) has been included in XFree86 4.1.0.
4.0.3 and earlier would match fonts in lexicographic order, thus
10646-1 would come before 8859-1.  4.1.0 will order them numerically,
thus yielding 8859-1 instead.

Upgrading to 4.1.0 should therefore make the bug go away in a standard
configuration -- that is, assuming that you don't have encodings that
come before 8859-1 numerically.  However, the bug really is in Gtk+,
so I don't recommend closing it for now.  (Upstream Gtk+ already know
about it, I believe, but you may want to check.)

JB> Confused experiments with a gtk font selection dialog suggest that
JB> there is no longer an 8-bit encoding of fixed(misc)?

That's weird; there should be at least a dozen.  Try

  xlsfonts -fn '-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO8859-*'
JB> Although there's clearly something I don't understand, because I
JB> asked the dialog to only show me iso8859-1, and it still gave me
JB> some 2-byte ones.

This is a new bug for me.  If you can confirm that, you should
most definitely report it upstream.

Regards,

                                        Juliusz



Reply to: