Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLazily load font face variations #187
Closed
Comments
|
Gecko does the same thing using Fontconfig:
|
burg
pushed a commit
that referenced
this issue
Nov 14, 2012
|
This was addressed in 905ad4a when The following verifies FontEntries are being created lazily under Linux:
|
|
Thanks for checking on this! |
glennw
pushed a commit
to glennw/servo
that referenced
this issue
Jan 16, 2017
Fix speed regressions in spheres demo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the FontList::refresh() method marches over all font faces installed on the system and creates CTFont, FontEntry, etc for it. If possible with CoreText APIs, we should instead eagerly create FontFamily entries, but lazily create the FontEntries whenever the FontFamily is queried.
This is approximately what Gecko does, but they use the ATS API instead of CoreText. The main challenge is getting reliable family names without creating CTFont instances, and then going from family name to CTFont instance using descriptors or whatever.
Promising API:
CTFontManagerCopyAvailableFontFamilyNames