Add iOS support to load_system_fonts#87
Open
fondoger wants to merge 1 commit into
Open
Conversation
Reuses the existing macOS path-scanning logic for iOS, since /System/Library/Fonts is accessible from sandboxed iOS apps via the application container's symlink to /System/Library (permitted by App Store review guideline 2.5.2). Changes: - load_system_fonts: extend the macOS cfg block to also fire on iOS - family_fantasy: default to "Papyrus" on iOS as well (matches macOS) - Linux cfg blocks: exclude iOS so the iOS path doesn't fall through Closes RazrFalcon#77.
Owner
|
Thanks! Unfortunately, the project is currently unmaintained. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #77 — adds iOS support to
Database::load_system_fontsby reusing the existing macOS path-scanning logic.Why this approach
As discussed in #77 by @Kees-van-Beilen, iOS apps can access
/System/Library/Fonts/from a sandboxed app via the application container's symlink to/System/Library. This is explicitly permitted by App Store review guideline 2.5.2 and is the same approach used by many shipping iOS apps. No CoreText FFI dependency is required, and the change keeps fontdb's portable, dependency-free architecture intact.Changes
load_system_fonts: extend the macOScfgblock to fire on iOS too.family_fantasy: default to"Papyrus"on iOS as well (matches macOS, as the same system fonts are present).cfgblocks: excludetarget_os = "ios"so iOS doesn't accidentally fall through to the Linux/fontconfig branch.Verification