Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tkinter does not find font #54327

Closed
marksaaltink mannequin opened this issue Oct 16, 2010 · 8 comments
Closed

Tkinter does not find font #54327

marksaaltink mannequin opened this issue Oct 16, 2010 · 8 comments
Labels
topic-tkinter type-bug An unexpected behavior, bug, or error

Comments

@marksaaltink
Copy link
Mannequin

marksaaltink mannequin commented Oct 16, 2010

BPO 10118
Nosy @terryjreedy, @bitdancer, @asvetlov, @serhiy-storchaka, @E-Paine

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2020-06-17.15:22:09.382>
created_at = <Date 2010-10-16.01:30:28.664>
labels = ['type-bug', 'expert-tkinter']
title = 'Tkinter does not find font'
updated_at = <Date 2020-06-17.15:22:09.381>
user = 'https://bugs.python.org/marksaaltink'

bugs.python.org fields:

activity = <Date 2020-06-17.15:22:09.381>
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date = <Date 2020-06-17.15:22:09.382>
closer = 'terry.reedy'
components = ['Tkinter']
creation = <Date 2010-10-16.01:30:28.664>
creator = 'mark.saaltink'
dependencies = []
files = []
hgrepos = []
issue_num = 10118
keywords = []
message_count = 8.0
messages = ['118850', '119416', '119426', '119670', '220638', '220656', '371725', '371753']
nosy_count = 7.0
nosy_names = ['terry.reedy', 'gpolo', 'r.david.murray', 'asvetlov', 'mark.saaltink', 'serhiy.storchaka', 'epaine']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue10118'
versions = ['Python 2.7']

@marksaaltink
Copy link
Mannequin Author

marksaaltink mannequin commented Oct 16, 2010

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?

@marksaaltink marksaaltink mannequin added topic-tkinter type-bug An unexpected behavior, bug, or error labels Oct 16, 2010
@terryjreedy
Copy link
Member

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.

@bitdancer
Copy link
Member

Terry meant 2.6 is in security fix only mode. 2.7 will get bug fixes for an extended period.

@marksaaltink
Copy link
Mannequin Author

marksaaltink mannequin commented Oct 27, 2010

I built the latest 2.7, with tk/tcl 8.5, and see the same problem.

@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Jun 15, 2014

Is this still a problem with tcl/tk 8.6?

@terryjreedy
Copy link
Member

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.

@E-Paine
Copy link
Mannequin

E-Paine mannequin commented Jun 17, 2020

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).

@terryjreedy
Copy link
Member

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))

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-tkinter type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants