Metadata-Version: 2.1
Name: pyfonts
Version: 0.0.2
Summary: A simple way to load fonts for matplotlib
Home-page: https://github.com/JosephBARBIERDARNAL/pyfonts/blob/main/README.md
Author: Joseph Barbier
Author-email: Joseph Barbier <joseph.barbierdarnal@gmail.com>
Project-URL: Homepage, https://github.com/JosephBARBIERDARNAL/pyfonts
Project-URL: Issues, https://github.com/JosephBARBIERDARNAL/pyfonts/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: Matplotlib
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib

# PyFonts

<img src="https://github.com/JosephBARBIERDARNAL/static/blob/main/python-libs/pyfonts/image.png?raw=true" alt="pyfonts logo" align="right" width="200px"/>

A simple (and reproducible) way to load fonts for `matplotlib`.

Check out [the online documentation](https://python-graph-gallery.com/pyfonts/).

<br><br>

# Installation

_Note: pyfonts requires **Python 3.9** and above._

You can install `pyfonts` directly from PyPI with:

```
pip install pyfonts
```

<br><br>

# Quick start

`pyfonts` is designed to make the code of your graphs more reproducible by removing the need to add the local path to the font files. For example:

```python
from pyfonts import load_font
import matplotlib.pyplot as plt

font = load_font(
    font_url="https://github.com/google/fonts/raw/main/apache/ultra/Ultra-Regular.ttf"
)

fig, ax = plt.subplots(figsize=(10, 6))
ax.text(
    x=0.5,
    y=0.5,
    s=f"What an easy way to load fonts, isn't it?",
    font=font,
    fontsize=20,
    ha="center",
)
plt.show()
```

![output of quick start](https://github.com/JosephBARBIERDARNAL/pyfonts/blob/main/img/quickstart.png?raw=true)

<br><br>

# Usage guide

Check out [the online documentation](https://python-graph-gallery.com/pyfonts/).

<br><br>

# Contributions

Contributions and feedback are welcome.

There's not much that needs to be implemented at the moment. If you've found a bug or want to request a new feature, open an [issue](https://github.com/JosephBARBIERDARNAL/pyfonts/issues).

<br><br><br>
