Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion devine/core/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,16 @@ def get_system_fonts() -> dict[str, Path]:
for n in range(0, total_fonts)
for name, filename, _ in [winreg.EnumValue(key, n)]
}
elif sys.platform == "linux":
import subprocess
return {
# fc-list should be installed by default on every system.
name.strip() if ":" not in name else name.split(":")[0].strip() : Path(path)
for font in subprocess.getstatusoutput("fc-list")[1].split("\n")
for path, name in [font.split(":", 1)]
}
else:
# TODO: Get System Fonts for Linux and mac OS
# TODO: Get System Fonts for mac OS
return {}


Expand Down