This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


A simple font chooser for Tkinter that allow the user to select the font family among the fonts available on his/her system. The size and style (bold, italic, underline, strikethrough) of the text can be set too.

This module contains a FontChooser class which implements the font chooser and an askfont function that displays the font chooser and returns the chosen font when the user closes the font chooser. The font is returned as a dictionary like the one returned by the function tkFont.Font.actual.


  • Linux, Windows, Mac
  • Python 2 or 3 with tkinter + ttk (default for Windows but not for Linux)


With pip:

$ pip install tkFontChooser


    from tkinter import Tk
except ImportError:
    from Tkinter import Tk
from sys import platform
from tkFontChooser import askfont

# create main window
root = Tk()
style = Style(root)
if "win" == platform[:3]:
elif "darwin" in platform:
bg = style.lookup("TLabel", "background")
label = Label(root, text='Chosen font: ')
label.pack(padx=10, pady=(10,4))

def callback():
    # open the font chooser and get the font selected by the user
    font = askfont(root)
    # font is "" if the user has cancelled
    if font:
        # spaces in the family name need to be escaped
        font['family'] = font['family'].replace(' ', '\ ')
        font_str = "%(family)s %(size)i %(weight)s %(slant)s" % font
        if font['underline']:
            font_str += ' underline'
        if font['overstrike']:
            font_str += ' overstrike'
        label.configure(font=font_str, text='Chosen font: ' + font_str.replace('\ ', ' '))

Button(root, text='Font Chooser', command=callback).pack(padx=10, pady=(4,10))
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tkFontChooser-1.0.0-py2.py3-none-any.whl (7.9 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 11, 2016
tkFontChooser-1.0.0.tar.gz (19.0 kB) Copy SHA256 Checksum SHA256 Source Sep 11, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting