[cairo] cairo/quartz on iPhone
behdad at behdad.org
Mon Mar 10 08:14:07 PDT 2008
On Fri, 2008-03-07 at 12:45 -0500, Vladimir Vukicevic wrote:
> ATSUI does complex text layout for OSX; it's roughly equivalent to
> Pango. It's been deprecated (it has a horrid API and is slow for many
> things), and at least on desktop OSX, is being replaced with Core
> Text. CT is much nicer to work with, and I'm pretty sure these days
> ATSUI is using a lot of CT under the hood. I'm not sure what the
> complex text layout replacement is on the iPhone, but I don't think
> that matters for cairo's purposes.
> CGFont is just a handle to a native (unscaled) font; you can do things
> like render glyphs, convert unicode chars to glyph ids, get glyph
> bounds, etc., but it doesn't do any complex text layout; it's also
> sticking around, unlike ATSUI :) This is the right level for cairo to
> be hooking into anyway -- it maps pretty directly to the font_face/
> scaled_font operations.
Right. I always was unhappy about using ATSUI for cairo fonts, but
didn't know that a lower-level API exists.
> > Also, getting quartz as supported in 1.6 may not be very realistic.
> > If
> > you are serious about it, you may want to move the quartz_image stuff
> > into a separate header file for now. Without those, the cairo-
> > quartz.h
> > API looks solid. Same about cairo-atsui.h, even if atsui will be
> > deprecated, that function is still useful, and we can add other
> > font-face constructors in the future. Or should the CGFont stuff be
> > done as a new font backend with a new type?
> Sure, if it's just the quartz image stuff you object to, that's an
> easy fix :) I'll move those into a separate header, do you want a
> separate configure option for it as well? The CGFont backend is a new
> font backend, but the current atsui entry point can easily be
> implemented in terms of it (there's a straightforward way to go from
> an ATSFontRef to a CGFontRef).
How about removing cairo-atsui and adding CGFont? If you can provide
that, and a patch to Pango, I'm fine with it going in.
Of course it doesn't help that CAIRO_FONT_TYPE_ATSUI is in cairo.h... I
tried my best to keep backend names out of cairo.h, but I lost...
> - Vlad
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo