Menu

#2104 should NOT ignore the XLFD_AVERAGE_WIDTH for scalable fonts

open
5
2006-10-18
2006-08-22
No

In TkFontParseXLFD() in generic/tkFont.c I read:

/* XLFD_AVERAGE_WIDTH ignored. */

However it happens that sometimes the X server returns
bogus font names with non zero XLFD_PIXEL_SIZE and
XLFD_AVERAGE_WIDTH=0 which correspond to scalable fonts.
This can confuse Tk when it ranks fonts for choosing
the one closest to a desired specification.

A font with XLFD_PIXEL_SIZE != 0 and XLFD_AVERAGE_WIDTH
== 0 is not a true fixed size font as suggested by
pixel size but a bogus font generated by the X server
for a scalable font. This font should be treated as
scalable font by Tk and pxlsz should be forced to 0 in
TkFontParseXLFD().

For a detailed description of the problem and a patch see:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=156119
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=156115

Discussion

  • Joe English

    Joe English - 2006-10-18

    Logged In: YES
    user_id=68433

    kbk, is this related to what you're working on?

     
  • Joe English

    Joe English - 2006-10-18
    • assigned_to: hobbs --> kennykb
     
  • Kevin B KENNY

    Kevin B KENNY - 2006-10-18

    Logged In: YES
    user_id=99768

    jenglish, indeed it does relate. Thanks for the pointer.