Re: Quartz backend on iOS/iPhone

Andrea Canciani <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAN_5=BAMXYr5xb_6TsMBx-c9Fw49v771XaVLzUWdG0Vrg5OnTw@mail.gmail.com>
On Thu, Aug 18, 2011 at 7:42 AM, Guido Lorenz <[email protected]> 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
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
>
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.