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.0.tar.gz
.
File metadata
- Download URL: FindSystemFontsFilename-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ed5e8a820e611deae4bd06d3371c4f5debb8ddffe6876f39ed9bb166c4036d8 |
|
MD5 | d1a5954348934f8b772d86da10c481f2 |
|
BLAKE2b-256 | 0b7c8c2c6b756804e49f5c356e0875ca3be32c896598542fc99590a2a6e24a81 |
File details
Details for the file FindSystemFontsFilename-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: FindSystemFontsFilename-0.1.0-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 | 171fb2ea1d7dd1c04a2b31cd6f9d762ff6830c53186f8261dd9f32152928c1b6 |
|
MD5 | de6a01e380384621f78257dfdcf5d07f |
|
BLAKE2b-256 | 86b5f254dc929da67dcd41b2bad9fb5741ff42fba046c3382e05fc5be0e98360 |