jonathang commited on
Commit
afb1ac5
1 Parent(s): 96f6893

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -0
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # An utility repo to load conveniently fonts using hf_hub_download:
2
+
3
+ ```python
4
+ from huggingface_hub import hf_hub_download
5
+ from PIL import ImageFont
6
+
7
+ font_path = hf_hub_download("jonathang/fonts-ttf", "Vogue.ttf")
8
+ font_obj = ImageFont(font_path, encoding="UTF-8")
9
+ ```
10
+
11
+ (based on https://huggingface.co/ybelkada/fonts)