AntonV HF Staff commited on
Commit
7e49e07
·
verified ·
1 Parent(s): 4df27bf

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -0
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Fonts
2
+
3
+ An utility repo to load conveniently fonts using `hf_hub_download`:
4
+
5
+ ```python
6
+ from huggingface_hub import hf_hub_download
7
+ from PIL import ImageFont
8
+
9
+ font_path = hf_hub_download("AntonV/ernie4_5_fonts", "Roboto-Regular.ttf")
10
+ font_obj = ImageFont.truetype(font_path)
11
+ ```