[cairo] Serious concerns about cairo
vladimirv at gmail.com
Sat Sep 23 13:12:14 PDT 2006
On 9/23/06, Carl Worth <cworth at cworth.org> wrote:
> As for providing mapping from a unicode character to a glyph index,
> there has been some discussion of this in the past. I'm not an expert
> in this area, but the last time the issue came up I was convinced by
> well-reasoned arguments against including this support in
> cairo. Similar arguments might apply to a ucs2-based API, though I'm
> not sure. Again, I'd have to dig up those conversations to remember
> the details.
The basic issue is that cairo should not be in the text layout or even
in the font business. It should know how to render a glyph with the
current source at the current position, with the current
platform-specific font, and nothing more. The "toy" text API was
included as a concession to wanting to easily do simple text, but it's
not intended to be a real text rendering API.
Doing glyph lookups, rendering non-ascii script, font selection, etc.
are all huge jobs, and are best done in a layer above cairo -- whether
that's Uniscribe, ATSU, pango, or some custom-grown thing. It's very
easy to say "well, all I need is to just do glyph lookups for UCS2
characters", until someone tries to render an Indic or other script
where there isn't a 1-1 mapping... you end up either needing even more
functionality added, pushing things closer and closer to pango, or you
end up abandoning cairo for text layout and start using
If you want a cross-platform solution, pango has backends for
Uniscribe and ATSU for those platforms, and interacts well with cairo.
Unfortunately, it has potential licensing issues.
More information about the cairo