fontique: enumerate system fonts via CoreText#536
Conversation
Use CTFontCollection::from_available_fonts to extract font file URLs and scan the unique paths.\n\nIf enumeration fails, fall back to the previous Library/Fonts scan.
|
What is the motivation behind this PR? And please could you run a performance comparison comparing the old and new approaches? |
|
Thanks for the question. Motivation: on Apple platforms we previously populated system fonts by scanning Performance: I added a benchmark to track the one-time system-font initialization cost: Repro (macOS): On my Apple M2 (macOS 15.7.2), the parent commit (4fd74d9, directory scan) is ~9.5 ms median and |
|
This fixes #242. As such, I think we definitely ought to accept this PR. |
|
Does this capture the "hidden" system fonts, specifically San Francisco? If so, I'm +1 on this change. |
Use CTFontCollection::from_available_fonts to extract font file URLs and scan the unique paths.\n\nIf enumeration fails, fall back to the previous Library/Fonts scan.