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:
- Windows: DirectWrite API
- macOS: Core Text API
- Linux: Fontconfig API
- Android: NDK Font API
Installation
pip install FindSystemFontsFilename
How to use it
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file FindSystemFontsFilename-0.1.1.tar.gz
.
File metadata
- Download URL: FindSystemFontsFilename-0.1.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be774c5072e24c06b96a7821801d3b57eb707096614723313f17577f679006fe |
|
MD5 | daa05599b52d2ab0491d9d51f998d7bf |
|
BLAKE2b-256 | 580232f218eb82cf299da43e9bcd9070411914e9bfef70d9397de3e0d74bd2a1 |
File details
Details for the file FindSystemFontsFilename-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: FindSystemFontsFilename-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dacb55b25b006591ffd326d31bee597d3a53c94b1384f69d3127a037bfbdac75 |
|
MD5 | 51a962695c9eebe67aa8b73b7870d091 |
|
BLAKE2b-256 | 90ba876f697fbf4374f194d29c159bbe8ccbc5ee1a3d8e752c40f9c3ebcdee6c |