Skip to main content

Find the system fonts filename.

Project description

FindSystemFontsFilename

This tool allows you to get the font filename on your system. It will collect TrueType (.ttf), OpenType (.otf) and TrueType Collection (.ttf) font format.

It uses some APIs to find the font filename:

Installation

pip install FindSystemFontsFilename

How to use it

from find_system_fonts_filename import get_system_fonts_filename, FindSystemFontsFilenameException

try:
    fonts_filename = get_system_fonts_filename()
except FindSystemFontsFilenameException:
    # Deal with the exception
    pass

Alternative

from find_system_fonts_filename import AndroidLibraryNotFound, get_system_fonts_filename, FontConfigNotFound, OSNotSupported

try:
    fonts_filename = get_system_fonts_filename()
except (AndroidLibraryNotFound, FontConfigNotFound, OSNotSupported):
    # Deal with the exception
    # OSNotSupported can only happen in Windows, macOS and Android
    #   - Windows Vista SP2 and more are supported
    #   - macOS 10.6 and more are supported
    #   - Android SDK/API 29 and more are supported
    # FontConfigNotFound can only happen on Linux when Fontconfig could't be found.
    # AndroidLibraryNotFound can only happen on Android when the android library could't be found.
    pass

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

FindSystemFontsFilename-0.2.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

FindSystemFontsFilename-0.2.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file FindSystemFontsFilename-0.2.0.tar.gz.

File metadata

File hashes

Hashes for FindSystemFontsFilename-0.2.0.tar.gz
Algorithm Hash digest
SHA256 77519e481dd7528a3049d753cf9dd00c196aac9151f8aa23f31b097441b31a30
MD5 96113b3f185a298e3f51ce76b2fe8ef8
BLAKE2b-256 6ec7d11fe4b12b06b79291424c83890cf4467414765ef3c52c83a22e881e282c

See more details on using hashes here.

File details

Details for the file FindSystemFontsFilename-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for FindSystemFontsFilename-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec10625f8da17a9f090fbe6754e2717d018d7f36b81c66aefae21596e45993de
MD5 68f48a35516e9de89f85d5484fe08efa
BLAKE2b-256 bb444c5fea665fdea2a78fad33889675e4e8ec86d8ef3f12c0c8f6032154b160

See more details on using hashes here.

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