Support iOS
I would like to use a ui toolkit which uses this crate on iOS (floem, cosmic-text). Since the System directory with the fonts cannot be accessed on iOS i think CoreText must be used. The available fonts can be listed with this method.
Is this in scope for this library?
I think this is out of scope. If the directory with fonts can't be accessed, there is no way for the TTF files to be loaded and therefore no way to query font info with fontdb's current architecture.
fonts can be accessed on ios from the following paths: /System/Library/Fonts/ /System/Library/Fonts/Cache even in a sandboxed app
you can also read /System/Library/Fonts/CGFontCache.plist to get a list of fonts, but scanning the directory works also
fonts can be accessed on ios from the following paths: /System/Library/Fonts/ /System/Library/Fonts/Cache even in a sandboxed app
you can also read /System/Library/Fonts/CGFontCache.plist to get a list of fonts, but scanning the directory works also
While it might be possible, afaik it is against the „rules“ and would prevent publishing in the app store SO question
Fontique, which also provides font enumeration and fallback, does use CoreText: implementation
No it isn't against the rules and many apps use it:
2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the app completely viewable and editable by the user.
The application container provides a symlink to /System/Library/, thus it is allowed