[cairo] Quartz backend on iOS/iPhone
Andrea Canciani
ranma42 at gmail.com
Sun Oct 2 08:34:50 PDT 2011
On Thu, Aug 18, 2011 at 7:42 AM, Guido Lorenz <code at superquadratic.net> wrote:
> Hi,
>
> I'd like to share a small patch that allowed me to build the Quartz backend for iOS/iPhone. [1]
>
> One part of the patch fixes the configure script which did look for the correct framework (CoreGraphics on iOS, instead of ApplicationServices on Mac OS X), but did not set use_quartz back to "yes" (after the failed search for ApplicationServices set it to "no").
>
> The other part conditionally includes the CoreGraphics header instead of ApplicationServices in cairo-quartz.h. It also disables cairo_quartz_font_face_create_for_atsu_font_id() -- I'm not sure if ATSUI is available on iOS (afaik it is at least deprecated), so using an "ifdef" was the easiest solution.
>
> I have only tested it a little, but it seems to work for me.
I have pushed to master a commit that breaks this patch :(
Regarding the patch, I'd rather have a #define which specifies if we
should #include CoreGraphics or ApplicationServices.
We should also use autotools to detect if the ATSUI-related font types
are available and declare the functions which need them in the
prototype only if they actually are.
Anyway, thanks for your patch, I haven't forgot about the need to
improve support for iOS and I'm keeping track of your patch (also
because you provide the whole env settings needed to compile...
great!)
I hope my next mail in this thread will be better news ;)
Andrea
>
> Cheers,
> Guido
>
> ---
> [1] These are the environment variables and configure flags I used:
>
> export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
> export SDKROOT=$DEVROOT/SDKs/iPhoneOS4.3.sdk
> export CFLAGS="-arch armv7 -pipe -no-cpp-precomp -isysroot $SDKROOT -miphoneos-version-min=3.2 -I$SDKROOT/usr/include/"
> export CC="$DEVROOT/usr/bin/gcc-4.2"
> export LD=$DEVROOT/usr/bin/ld
> export AR=$DEVROOT/usr/bin/ar
> export AS=$DEVROOT/usr/bin/as
> export NM=$DEVROOT/usr/bin/nm
> export RANLIB=$DEVROOT/usr/bin/ranlib
> export LDFLAGS="-L$SDKROOT/usr/lib/"
>
> ./autogen.sh --host=arm-apple-darwin7 --enable-shared=no --enable-xlib=no --enable-xlib-xrender=no --enable-ft=no --enable-fc=no
>
>
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
More information about the cairo
mailing list