imgUtils01.py 274 Bytes
import win32com.client

# 创建 Shell 对象
shell = win32com.client.Dispatch("WScript.Shell")

# 获取字体集合
font_collection = shell.Environment("PROCESS").items("SystemRoot") + "\\Fonts"

# 遍历字体集合
for font_file in font_collection:
    print(font_file)