Metadata-Version: 2.1
Name: FindSystemFontsFilename
Version: 0.0.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
Requires-Dist: comtypes ; platform_system == "Windows"

# 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/)

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

## How to use it
```python
from find_system_fonts_filename import get_system_fonts_filename, FontConfigNotFound, OSNotSupported

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