INNER CODE UNIT · Python
font_directories
utopia-rise/godot-jvm · logo/export.py:84
def font_directories():
home = Path.home()
directories = []
custom = os.environ.get('GODOT_JVM_FONT_DIR')
if custom:
directories.append(Path(custom))
if SYSTEM == 'Windows':
directories.append(Path(os.environ.get('WINDIR', 'C:/Windows')) / 'Fonts')
directories.append(home / 'AppData' / 'Local' / 'Microsoft' / 'Windows' / 'Fonts')
elif SYSTEM == 'Darwin':
directories.append(Path('/Library/Fonts'))
directories.append(Path('/System/Library/Fonts'))
directories.append(home / 'Library' / 'Fonts')
else:
directories.append(Path('/usr/share/fonts'))
directories.append(Path('/usr/local/share/fonts'))
directories.append(home / '.fonts')
directories.append(Path(os.environ.get('XDG_DATA_HOME', home / '.local' / 'share')) / 'fonts')