This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2010-10-16 01:30 by mark.saaltink, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
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.
msg220638 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-15 13:38
Is this still a problem with tcl/tk 8.6?
msg220656 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-15 17:56
Mark, On Windows, 3.4 comes with tck/tk 8.6. I am guessing that you built not on windows. In any case, tkinter has had several patches since you last posted, not all backported to 2.7, so an updated report with 3.4 or 3.5 and 8.6 would help delineate the scope of the font recognition problem.
msg371725 - (view) Author: E. Paine (epaine) * Date: 2020-06-17 09:39
On Linux using, tcl 8.6.10 and Python 3.8.3, this does not appear to be an issue (Zed appears in the tkinter font family list).
msg371753 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-06-17 15:22
If this is not out of date, it is, and was, a tcl/tk (3rd party) issue.  tkinter.font.families basically wraps a tk call. 
      return root.tk.splitlist(root.tk.call("font", "families", *args))
History
Date User Action Args
2022-04-11 14:57:07adminsetgithub: 54327
2020-06-17 15:22:09terry.reedysetstatus: open -> closed
resolution: out of date
messages: + msg371753

stage: resolved
2020-06-17 09:39:42epainesetnosy: + epaine
messages: + msg371725
2019-03-15 23:14:57BreamoreBoysetnosy: - BreamoreBoy
2014-06-15 17:56:57terry.reedysetnosy: + serhiy.storchaka
messages: + msg220656
2014-06-15 13:38:46BreamoreBoysetnosy: + BreamoreBoy
messages: + msg220638
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