[issue4281] Idle - incorrectly displaying a character (Latin capital letter sharp s)

Martin v. Löwis report at bugs.python.org
Sat Nov 8 13:15:42 CET 2008


Martin v. Löwis <martin at v.loewis.de> added the comment:

On my system, a square box is drawn indeed.

First, I would like to confirm that this is not a bug in Python. Can you
please install Tcl 8.5 separately, run wish, and execute

   label .l -text "\u1e9e"
   pack .l

IIUC, Tk will try to find a font that contains the character. First,
there is a list of fallback fonts per family. If none supports the
character, there is a global fallback list. If the character is still
not found, it will enumerate all fonts in the system, and invokes
GetFontData, asking for the resource 0x636d6170 - this should give the
list of all characters supported in the font.

It would be useful to find out what specific font Tk has chosen.
Unfortunately, there seems to be no direct way to find out. In the
Tktest Tcl extension, there is a command "testfont subfonts <fontname>"
which you can use to find out what subfonts have been loaded; this might
give a clue what subfont was used.

If you are willing to recompile Tk, you can augment
tkWinFont.c:FindSubFontForChar to print a message when this specific
char gets looked up, and what the resulting subfont was.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4281>
_______________________________________


More information about the Python-bugs-list mailing list