Bug 97895

Summary: [PATCH] Quartz font backend compilation for iOS
Product: cairo Reporter: Peter TB Brett <peter>
Component: quartz font backendAssignee: Vladimir Vukicevic <vladimir>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: iOS build support patch v1 (needs further work)

Description Peter TB Brett 2016-09-22 12:17:26 UTC
Created attachment 126730 [details]
iOS build support patch v1 (needs further work)

Cairo's Quartz font backend is quite useful when compiling Cairo for iOS.  However, on iOS, the ApplicationServices framework is not available.  This mostly doesn't present a problem; the CoreGraphics and CoreText frameworks contain everything that's needed for the backend to be helpful.

The Cairo master branch source code won't compile unmodified for iOS because it assumes the availability of ApplicationServices and the ATSUFontID type definition.

This patch modifies the Quartz font backend to omit the ApplicationServices-dependent code depending on three feature macros:

- CAIRO_HAS_QUARTZ_APPLICATION_SERVICES
- CAIRO_HAS_QUARTZ_CORE_GRAPHICS
- CAIRO_HAS_QUARTZ_ATSUFONTID

We do not use the Autotools-based build system for our solution, because it doesn't understand iOS SDKs, and so this patch doesn't make any build system changes to define these macros as necessary.

However, I am keen to get this patch (or some variant) of this patch upstream, because I believe it would be useful to other Cairo users, and am happy to help with any changes required.
Comment 1 GitLab Migration User 2018-08-25 13:58:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/293.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.