Get list of all available fonts in Tkinter in python

In my work, I learn about the Tkinter library.
in Tkinter, we can create some awesome fonts. we can change the font family. If we want, we can manipulate the font derived from the Tkinter.

As we know Tkinter contains a font module that gives us many fonts, so to see those fonts first we need to

  1. At first I have to import the font module.
  2. After that I declare a fonts variable that contains the list method which includes the font families this method returns all the fonts in Tkinter.
  3. After creating then initialize the root window.
  4. After that printing fonts variable shows all of the fonts in the console or terminal. But the output is not showing organized it needs a line space so, created a for loop just to look good at all the fonts names.
  5. Then just knowing the fonts name I use the len function. so it shows the length which is 309.
import tkinter as tk
from tkinter import Tk, font
newWindow=tk.Tk()
fonts=list(font.families())
for f_name in fonts:
    print(f_name)
print(len(fonts))
newWindow.mainloop()

Output :

System
8514oem
Fixedsys
Terminal
Modern
Roman
Script
Courier
MS Serif
MS Sans Serif
Small Fonts
Marlett
Arial
Arabic Transparent
Arial Baltic
Arial CE
Arial CYR
Arial Greek
Arial TUR
Arial Black
Bahnschrift Light
Bahnschrift SemiLight
Bahnschrift
Bahnschrift SemiBold
Bahnschrift Light SemiCondensed
Bahnschrift SemiLight SemiConde
Bahnschrift SemiCondensed
Bahnschrift SemiBold SemiConden
Bahnschrift Light Condensed
Bahnschrift SemiLight Condensed
Bahnschrift Condensed
Bahnschrift SemiBold Condensed
Calibri
Calibri Light
Cambria
Cambria Math
Candara
Candara Light
Comic Sans MS
Consolas
Constantia
Corbel
Corbel Light
Courier New
Courier New Baltic
Courier New CE
Courier New CYR
Courier New Greek
Courier New TUR
Ebrima
Franklin Gothic Medium
Gabriola
Gadugi
Georgia
Impact
Ink Free
Javanese Text
Leelawadee UI
Leelawadee UI Semilight
Lucida Console
Lucida Sans Unicode
Malgun Gothic
@Malgun Gothic
Malgun Gothic Semilight
@Malgun Gothic Semilight
Microsoft Himalaya
Microsoft JhengHei
@Microsoft JhengHei
Microsoft JhengHei UI
@Microsoft JhengHei UI
Microsoft JhengHei Light
@Microsoft JhengHei Light
Microsoft JhengHei UI Light
@Microsoft JhengHei UI Light
Microsoft New Tai Lue
Microsoft PhagsPa
Microsoft Sans Serif
Microsoft Tai Le
Microsoft YaHei
@Microsoft YaHei
Microsoft YaHei UI
@Microsoft YaHei UI
Microsoft YaHei Light
@Microsoft YaHei Light
Microsoft YaHei UI Light
@Microsoft YaHei UI Light
Microsoft Yi Baiti
MingLiU-ExtB
@MingLiU-ExtB
PMingLiU-ExtB
@PMingLiU-ExtB
MingLiU_HKSCS-ExtB
@MingLiU_HKSCS-ExtB
Mongolian Baiti
MS Gothic
@MS Gothic
MS UI Gothic
@MS UI Gothic
MS PGothic
@MS PGothic
MV Boli
Myanmar Text
Nirmala UI
Nirmala UI Semilight
Palatino Linotype
Sans Serif Collection
Segoe Fluent Icons
Segoe MDL2 Assets
Segoe Print
Segoe Script
Segoe UI
Segoe UI Black
Segoe UI Emoji
Segoe UI Historic
Segoe UI Light
Segoe UI Semibold
Segoe UI Semilight
Segoe UI Symbol
Segoe UI Variable Small Light
Segoe UI Variable Small Semilig
Segoe UI Variable Small
Segoe UI Variable Small Semibol
Segoe UI Variable Text Light
Segoe UI Variable Text Semiligh
Segoe UI Variable Text
Segoe UI Variable Text Semibold
Segoe UI Variable Display Light
Segoe UI Variable Display Semil
Segoe UI Variable Display
Segoe UI Variable Display Semib
SimSun
@SimSun
NSimSun
@NSimSun
SimSun-ExtB
@SimSun-ExtB
Sitka Small
Sitka Small Semibold
Sitka Text
Sitka Text Semibold
Sitka Subheading
Sitka Subheading Semibold
Sitka Heading
Sitka Heading Semibold
Sitka Display
Sitka Display Semibold
Sitka Banner
Sitka Banner Semibold
Sylfaen
Symbol
Tahoma
Times New Roman
Times New Roman Baltic
Times New Roman CE
Times New Roman CYR
Times New Roman Greek
Times New Roman TUR
Trebuchet MS
Verdana
Webdings
Wingdings
Yu Gothic
@Yu Gothic
Yu Gothic UI
@Yu Gothic UI
Yu Gothic UI Semibold
@Yu Gothic UI Semibold
Yu Gothic Light
@Yu Gothic Light
Yu Gothic UI Light
@Yu Gothic UI Light
Yu Gothic Medium
@Yu Gothic Medium
Yu Gothic UI Semilight
@Yu Gothic UI Semilight
HoloLens MDL2 Assets
Agency FB
Algerian
Arial Narrow
Arial Rounded MT Bold
Baskerville Old Face
Bauhaus 93
Bell MT
Berlin Sans FB
Berlin Sans FB Demi
Bernard MT Condensed
Blackadder ITC
Bodoni MT
Bodoni MT Black
Bodoni MT Condensed
Bodoni MT Poster Compressed
Book Antiqua
Bookman Old Style
Bookshelf Symbol 7
Bradley Hand ITC
Britannic Bold
Broadway
Brush Script MT
Californian FB
Calisto MT
Castellar
Centaur
Century
Century Gothic
Century Schoolbook
Chiller
Colonna MT
Cooper Black
Copperplate Gothic Bold
Copperplate Gothic Light
Curlz MT
Dubai
Dubai Light
Dubai Medium
Edwardian Script ITC
Elephant
Engravers MT
Eras Bold ITC
Eras Demi ITC
Eras Light ITC
Eras Medium ITC
Felix Titling
Footlight MT Light
Forte
Franklin Gothic Book
Franklin Gothic Demi
Franklin Gothic Demi Cond
Franklin Gothic Heavy
Franklin Gothic Medium Cond
Freestyle Script
French Script MT
Garamond
Gigi
Gill Sans MT
Gill Sans MT Condensed
Gill Sans MT Ext Condensed Bold
Gill Sans Ultra Bold
Gill Sans Ultra Bold Condensed
Gloucester MT Extra Condensed
Goudy Old Style
Goudy Stout
Haettenschweiler
Harlow Solid Italic
Harrington
High Tower Text
Imprint MT Shadow
Informal Roman
Jokerman
Juice ITC
Kristen ITC
Kunstler Script
Lucida Bright
Lucida Calligraphy
Lucida Fax
Lucida Handwriting
Lucida Sans
Lucida Sans Typewriter
Magneto
Maiandra GD
Matura MT Script Capitals
Mistral
Modern No. 20
Monotype Corsiva
MS Outlook
MS Reference Sans Serif
MS Reference Specialty
MT Extra
Niagara Engraved
Niagara Solid
OCR A Extended
Old English Text MT
Onyx
Palace Script MT
Papyrus
Parchment
Perpetua
Perpetua Titling MT
Playbill
Poor Richard
Pristina
Rage Italic
Ravie
Rockwell
Rockwell Condensed
Rockwell Extra Bold
Script MT Bold
Showcard Gothic
Snap ITC
Stencil
Tempus Sans ITC
Tw Cen MT
Tw Cen MT Condensed
Tw Cen MT Condensed Extra Bold
Viner Hand ITC
Vivaldi
Vladimir Script
Wide Latin
Wingdings 2
Wingdings 3
Cascadia Code ExtraLight
Cascadia Code Light
Cascadia Code SemiLight
Cascadia Code
Cascadia Code SemiBold
Cascadia Mono ExtraLight
Cascadia Mono Light
Cascadia Mono SemiLight
Cascadia Mono
Cascadia Mono SemiBold
309

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top