classification
Title: Tkinter does not find font
Type: behavior Stage:
Components: Tkinter Versions: Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, gpolo, mark.saaltink, r.david.murray, terry.reedy
Priority: normal Keywords:

Created on 2010-10-16 01:30 by mark.saaltink, last changed 2012-03-21 19:44 by asvetlov.

Messages (4)
msg118850 - (view) Author: mark saaltink (mark.saaltink) Date: 2010-10-16 01:30
Tkinter, since tk 8.5 apparently, does not find all the fonts that tk knows about.

I'm using Python 2.6.5 on Linux but have seen this on previous versions.  I have added the font with "xset fp+ <some font directory>"".  The font is Richard Jones' zed font, available from http://www.cs.kent.ac.uk/people/staff/rej/Zedfont/latest/

xlsfonts shows the font.

tk sees the font; in wish if I type "font families" there it is:

% font families
{fangsong ti} fixed {clearlyu alternate glyphs} charter lucidatypewriter zedfont {latin modern roman}  ...

In Tkinter I do not see the font:
>>> from Tkinter import *
>>> r = Tk()
>>> import tkFont
>>> tkFont.families(r)
... no sign of the zedfont here.

Is this expected behaviour?  Is there another way to install the font that avoids this problem?
msg119416 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-10-23 04:09
2.7 is in security-fix only mode. I am assuming that this is still a problem in 2.7 (and possibly 3.x). It would be good to confirm this.
msg119426 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-10-23 12:56
Terry meant 2.6 is in security fix only mode.  2.7 will get bug fixes for an extended period.
msg119670 - (view) Author: mark saaltink (mark.saaltink) Date: 2010-10-27 02:28
I built the latest 2.7, with tk/tcl 8.5, and see the same problem.
History
Date User Action Args
2012-03-21 19:44:27asvetlovsetnosy: + asvetlov
2010-10-27 02:28:20mark.saaltinksetmessages: + msg119670
2010-10-23 12:56:39r.david.murraysetnosy: + r.david.murray
messages: + msg119426
2010-10-23 04:09:05terry.reedysetnosy: + terry.reedy

messages: + msg119416
versions: + Python 2.7, - Python 2.6
2010-10-18 16:14:53eric.araujosetnosy: + gpolo
2010-10-16 01:30:28mark.saaltinkcreate