Menu

#1358 user fontpath priorities ignored on X11

closed-fixed
8
2003-02-25
2002-12-03
No

(Report forwarded from Debian. The original bug report,
with analysis and patch, can be seen at
<http://bugs.debian.org/156118>.)

This bug was originally reported against Debian's tk
8.3.3 package, but it is still present in 8.4.1.

Executive summary: when scanning X11 fonts, Tk chooses
the last best match, rather than the first best match
(in the case where more than one font qualifies as a
"best" match). This completely subverts the user's
chosen priorities, making the user's least preferred
font into the top choice. It is, of course, a simple
case of "<=" being used where "<" would be
appropriate. The simple patch (from Massimo Dal Zotto
<dz@cs.unitn.it>) is attached.

Discussion

  • Chris Waters

    Chris Waters - 2002-12-03

    X11 font ordering patch

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-25

    Logged In: YES
    user_id=72656

    OK, this appears to be correct, in that only updated fonts with
    a strictly lower become "best". Is this something that should
    go into 8.4.2 (patchlevel release) or 8.5 (minor release) since
    it may well show different fonts (which is the desired
    behavior ... but is it something "ok" for a patchlevel?).

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-25
    • priority: 5 --> 8
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-25

    Logged In: YES
    user_id=72656

    Also note that that debian bug says that the font man page
    specifies that "Helvetica" should == "helvetica" (that font
    family names are case-insensitive).

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-25

    Logged In: YES
    user_id=72656

    Applied for 8.4.2.

    RE: font comparisons, I see several uses of strcasecmp, but
    perhaps the families should all be lower-cased when they
    come in. If someone has a clear patch for this, please open
    a separate report.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-25
    • status: open --> closed-fixed