Metadata-Version: 2.1
Name: FindSystemFontsFilename
Version: 0.1.2
Summary: Find the system fonts filename.
Home-page: https://github.com/moi15moi/FindSystemFontsFilename/
Author: moi15moi
Author-email: moi15moismokerlolilol@gmail.com
License: MIT
Project-URL: Source, https://github.com/moi15moi/FindSystemFontsFilename/
Project-URL: Tracker, https://github.com/moi15moi/FindSystemFontsFilename/issues/
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# 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](https://learn.microsoft.com/en-us/windows/win32/directwrite/direct-write-portal)
- macOS: [Core Text API](https://developer.apple.com/documentation/coretext)
- Linux: [Fontconfig API](https://www.freedesktop.org/wiki/Software/fontconfig/)
- Android: [NDK Font API](https://developer.android.com/ndk/reference/group/font)

## Installation
```
pip install FindSystemFontsFilename
```

## How to use it
```python
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
```
