A simple way to load fonts for matplotlib
Project description
PyFonts
A simple (and reproducible) way to load fonts for matplotlib
.
Check out the online documentation.
Installation
Note: pyfonts requires Python 3.9 and above.
You can install pyfonts
directly from PyPI with:
pip install pyfonts
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:
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()
Usage guide
Check out the online documentation.
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.
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 pyfonts-0.0.2.tar.gz
.
File metadata
- Download URL: pyfonts-0.0.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d942ee84db70c33a0a553619a52bff6bf2091c7751648f0f7ca09c56466d254d |
|
MD5 | 7d06d05e22703c78d838940f221cbd3c |
|
BLAKE2b-256 | 09331631ddc10e98164cc2808ed13c81f3e68eca29784d8951805b11dde32325 |
File details
Details for the file pyfonts-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pyfonts-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f51c3b6bdb64efdc422d2b3d0aa69c5bb95f90e7419cbc026e90c18aa30ca06 |
|
MD5 | 5cd58a7baf027ebdc9bf066333a9ea2d |
|
BLAKE2b-256 | a1000aebe94c3a55d27a8be1419c577f5f61fd593a8d4b7f18e79559127c6478 |