Metadata-Version: 2.4
Name: pyfonts
Version: 1.3.0
Summary: A simple and reproducible way of using fonts in matplotlib
Author-email: Joseph Barbier <joseph@ysunflower.com>
License-Expression: MIT
Project-URL: Documentation, https://y-sunflower.github.io/pyfonts/
Project-URL: Homepage, https://y-sunflower.github.io/pyfonts/
Project-URL: Issues, https://github.com/y-sunflower/pyfonts/issues
Project-URL: Repository, https://github.com/y-sunflower/pyfonts
Keywords: bunny,font,google,matplotlib,reproducibility
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Matplotlib
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: requests
Dynamic: license-file

<div align="center" style="font-size: 1.6em">

# pyfonts

[![PyPI Downloads](https://static.pepy.tech/badge/pyfonts)](https://pepy.tech/projects/pyfonts)
![Coverage](https://raw.githubusercontent.com/y-sunflower/pyfonts/refs/heads/main/coverage-badge.svg)
![Python Versions](https://img.shields.io/badge/Python-3.9–3.14-blue)

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

</div>

A **simple** and **reproducible** way of using fonts in matplotlib. In short, `pyfonts`:

- allows you to use all fonts from [**Google Font**](https://fonts.google.com/)
- allows you to use all fonts from [**Bunny Font**](https://fonts.bunny.net/) (GDPR-compliant alternative to Google Fonts)
- allows you to use any font from an **arbitrary URL**
- is **efficient** (thanks to its cache system)

<br>

## Quick start

- Google Fonts

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

font = load_google_font("Fascinate Inline")

fig, ax = plt.subplots()
ax.text(x=0.2, y=0.5, s="Hey there!", size=30, font=font)
```

![](https://raw.githubusercontent.com/y-sunflower/pyfonts/refs/heads/main/docs/img/quickstart.png)

- Bunny Fonts

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

font = load_bunny_font("Barrio")

fig, ax = plt.subplots()
ax.text(x=0.2, y=0.5, s="Hey there!", size=30, font=font)
```

![](https://raw.githubusercontent.com/y-sunflower/pyfonts/refs/heads/main/docs/img/quickstart-2.png)

[**See more examples**](https://y-sunflower.github.io/pyfonts/#quick-start)

<br>

## Installation

```bash
pip install pyfonts
```
