Reputation: 35
tkinter normally offers fonts like Times New Roman, Arial or Calibri. However, when I print the available font families on my system, I get this output:
('fangsong ti', 'fixed', 'clearlyu alternate glyphs', 'courier 10 pitch', 'open look glyph', 'bitstream charter', 'song ti', 'open look cursor', 'newspaper', 'clearlyu ligature', 'mincho', 'clearlyu devangari extra', 'clearlyu pua', 'clearlyu', 'clean', 'nil', 'clearlyu arabic', 'clearlyu devanagari', 'gothic', 'clearlyu arabic extra')
I updated all possible packages and libraries but nothing seems to update this list of available fonts.
How can I update this list in order to get the usual fonts or how can I manually add fonts to tkinter?
Upvotes: 1
Views: 1565
Reputation: 385900
Tkinter does not guarantee that you have access to Times New Roman
, Arial
, or Calibri
. It simply gives you access to whatever fonts you have on your system. The way you install fonts depends on your system. There is no way to install fonts just for tkinter.
The only thing the tk documentation says about fonts is this1:
Tk guarantees to support the font families named Courier (a monospaced “typewriter” font), Times (a serifed “newspaper” font), and Helvetica (a sans-serif “European” font). The most closely matching native font family will automatically be substituted when one of the above font families is used.
1 http://tcl.tk/man/tcl8.5/TkCmd/font.htm
Upvotes: 4