Skip to content

Add iOS support to load_system_fonts#87

Open
fondoger wants to merge 1 commit into
RazrFalcon:masterfrom
fondoger:ios-support
Open

Add iOS support to load_system_fonts#87
fondoger wants to merge 1 commit into
RazrFalcon:masterfrom
fondoger:ios-support

Conversation

@fondoger
Copy link
Copy Markdown

@fondoger fondoger commented May 3, 2026

Summary

Closes #77 — adds iOS support to Database::load_system_fonts by 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 macOS cfg block to fire on iOS too.
  • family_fantasy: default to "Papyrus" on iOS as well (matches macOS, as the same system fonts are present).
  • Linux cfg blocks: exclude target_os = "ios" so iOS doesn't accidentally fall through to the Linux/fontconfig branch.

Verification

cargo check                                # macOS host: ✓
cargo check --target aarch64-apple-ios     # iOS device: ✓

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.
@RazrFalcon
Copy link
Copy Markdown
Owner

Thanks! Unfortunately, the project is currently unmaintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support iOS

2 participants