Extract font names from OTF/TTF/WOFF/WOFF2 files in python using fontTools

There are many use cases where we need to extract the original font name of an OTF/TTF file programmatically. The filename is obviously not reliable as it could be modified. It turns out that every OTF/TTF file stores metadata information in tables which includes quite a few pieces of information. The most relevant one is the font family and sub-family name. We will be using fonttools to extract this information.

 218 total views,  1 views today

How did you like the article?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0