# How to open all fonts at once?

I want to make all of the files in the windows/font/ folder open all at once in blender instead of needing to add each one in the folder individually. I need all of the fonts to be pre loaded or open so they display in this menu here:

Use python.

from bpy import ops
from glob import glob
from os import chdir, path

directory = "C:\\Windows\\Fonts"

chdir(directory)
for file in glob("*.ttf") + glob("*.otf"):
ops.font.open(filepath = path.join(directory, file), relative_path=False)


Replace the directory variable with the folder path, which contains your font files. Escape \ with \.

Paste the script in the text editor and press Run Script.

• That worked 100% thank you! Would you also happen to know how to add all fonts in blender to the create font list node automatically? [dl.dropboxusercontent.com/s/bdpjwieekqjsp9k/… Dec 15 '16 at 0:27
• Couple of suggestions can set the font path in user preferences files context.user_preferences.filepaths.font_directory, this can be used for directory. Using os.path.join(directory, file) in font.open(..) will make the script cross platform. Dec 15 '16 at 3:08
• @Nicholas Ask a new question. batFINGERThanks for the correction. I updated the post. Dec 15 '16 at 6:52
• IMO font.open should be multi file, (letting you select multiple or all with "a"). Using your code could quickly make an override of operator that uses the selected files list. Dec 15 '16 at 9:54