Tkinter and utf-8
Dirk Thierbach
dthierbach at gmx.de
Fri Oct 29 06:45:13 EDT 2004
Justin Ezequiel <jezequiel at gmail.com> wrote:
> Among others, I am missing characters in the range
> 017F 383 LATIN SMALL LETTER LONG S
> to
> 036F 879 COMBINING LATIN SMALL LETTER X
> my xlsfonts numbers:
> 448 539 24261
The numbers don't help a lot, but you can use xlsfonts to get better
information. Unicode encoding is 'iso10646-1', so do
xlsfonts -fn '*iso10646*'
to see what unicode fonts you have in the first place. Adding -lll
will list metrics for each character, so do (for example)
xlsfonts -lll -fn '*iso10646*' | grep 0x17f
to see all the metrics for LATIN SMALL LETTER LONG S. If any of these
have non-zero metrics, the character is available. Inspect the full
output to find the complete font name, and use 'xfd' to display the
font. On my system, for example, all *misc* fonts have this character,
but the *helvetica* fonts don't.
Finally, you have to make sure Tk uses the fonts. IIRC Tkinter allows
you to access the Tk option database, so set the font options
with X-style names. That should do the trick, but I didn't check.
> I'll get some help here re obtaining fonts.
> Thank you.
I use Debian, not Mandrake, but you should be able to download Mandrake
packages for fonts somewhere, if necessary. Make sure there is no version
clash with the X server you are using.
- Dirk
More information about the Python-list
mailing list