Skip to main content

Fonts loader for Tkinter

Project description

tkextrafont

Build status Build status PyPI version

From the basic concept of the old version of this repository and the build system created for python-gttk now comes a version of the extrafont package that is packaged for Python on both Windows and Linux platforms and run on CI platforms.

Building & Installation

The package is built with CMake and scikit-build, and on Windows an installation of MYS2 is required. The original build system for the extrafont package with a build system that depends on Visual Studio is not available in this repository, though you might be able to build the extrafont binary separately and then copy it as you require.

Linux

This example is given for Ubuntu 20.04, change the names of packages and commands as required for your distribution of choice.

sudo apt install python3-dev tcl-dev tk-dev \
    fontconfig libfontconfig1 libfontconfig1-dev \
    cmake cmake-data extra-cmake-modules build-essential
python -m pip install scikit-build
python setup.py install 

Windows

See the setup.py and .appveyor.yml for more detailed installation instructions. After installing the dependencies (tk, cmake, toolchain, fontconfig), run in the MSYS shell:

python setup..py build
python setup.py install

Usage

import tkinter as tk
from tkextrafont import Font

window = tk.Tk()
font = Font(file="tests/overhaul.ttf", family="Overhaul")
tk.Label(window, text="Hello", font=font).pack()
window.mainloop()

License & Copyright

This library is available under the MIT License, as described in LICENSE.md. extrafont is originally available under a different license, which is also found in LICENSE.md. The build system (setup.py, .appveyor.yml and .travis.yml) are available under GNU GPLv3 only.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tkextrafont-0.6.3-py3-none-win_amd64.whl (47.8 kB view hashes)

Uploaded Python 3 Windows x86-64

tkextrafont-0.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tkextrafont-0.6.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tkextrafont-0.6.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

tkextrafont-0.6.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page