fonts-ttf / README.md
jonathang's picture
Create README.md
afb1ac5
|
raw
history blame
317 Bytes

An utility repo to load conveniently fonts using hf_hub_download:

from huggingface_hub import hf_hub_download
from PIL import ImageFont

font_path = hf_hub_download("jonathang/fonts-ttf", "Vogue.ttf")
font_obj = ImageFont(font_path, encoding="UTF-8")

(based on https://huggingface.co/ybelkada/fonts)