Skip to content

Instantly share code, notes, and snippets.

@erraticgenerator
Last active November 1, 2020 00:15
Show Gist options
  • Save erraticgenerator/6b9bc56248d18f75a6d03f7f6e0060bb to your computer and use it in GitHub Desktop.
Save erraticgenerator/6b9bc56248d18f75a6d03f7f6e0060bb to your computer and use it in GitHub Desktop.
import glob
# change the root directory according to your setup
ROOT = '../../input/fonts/ofl'
# some fonts are within /ofl/fontname/static directory (2 levels deep)
all_fonts_path = glob.glob(ROOT + '/**/**/*.ttf', recursive=True)
print('number of font files in total: ', len(all_fonts_path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment