Skip to main content

No project description provided

Project description

windows-fonts

Enumerate and discover fonts on Windows

Why this module exists

Most (all?) python modules that render text to an image (matplotlib, PIL/Pillow etc) need to take a filename on Windows, but happily take a font name on other platforms, which is a) annoying from a cross-platform standpoint, and b) requires a bit of "faff" for the user to discover the font file for a given font.

Example

from windows_fonts import FontCollection

fonts = FontCollection()

# TODO: Add a "get_best_match" to find the font name and variant
family = fonts['Arial']
variant = family[0]
print(variant.filename)

Requirements

Python >= 3.7 Windows Vista and up

Project details


Download files

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

Source Distribution

windows_fonts-0.1.0a1.tar.gz (13.9 kB view hashes)

Uploaded Source

Built Distributions

windows_fonts-0.1.0a1-cp311-none-win_amd64.whl (152.4 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

windows_fonts-0.1.0a1-cp310-none-win_amd64.whl (152.4 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

windows_fonts-0.1.0a1-cp39-none-win_amd64.whl (152.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

windows_fonts-0.1.0a1-cp38-none-win_amd64.whl (152.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

windows_fonts-0.1.0a1-cp37-none-win_amd64.whl (152.7 kB view hashes)

Uploaded CPython 3.7 Windows 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