I have woff2 files that I would like to convert to ttf using Python and the fonttools library. I have seen some methods on how to convert ttf fonts to woff2 but I can't use them to do the opposite.
Thanks in advance
Here's the one-line command (on Windows):
python -c "from fontTools.ttLib import woff2; import brotli; woff2.decompress('path/to/your.woff2', 'path/to/output.ttf')"
Make sure you have installed brotli. Use forward slash (/) for the file path instead of backslash (\). The output can be either TTF or OTF.
How do I convert a woff2 font to ttf using fonttools in Python?