[Cairo] Text API proposal

Owen Taylor otaylor at redhat.com
Wed Jul 30 07:33:10 PDT 2003


On Wed, 2003-07-30 at 07:53, Carl Worth wrote:
> On Jul 30, Thorsten Behrens wrote:
>  > No idea about that. How about an API that deals exactly with the
>  > functionality needed by Cairo? Makes porter's life much more easy.
> 
> The problem is that Cairo doesn't need much. It just draws glyphs at
> specified locations, and that's pretty easy.
> 
> However, applications that compute the glyph positions are going to
> need a lot more information from the backend text engine. Rather than
> implementing all of that API in Cairo, I'm currently just passing up
> an FT_Face.

What I'd like to see is that you abstract things sufficiently so
that you pass up a FT_Face on Unix and a LOGFONT (or whatever)
on Windows.

We already have code in Pango to handle laying out out text for 
both FT_Face's and LOGFONT's. I'd much rather be able to use
that code rather than write new code to lay out text for 
CairoFonts.

And an additional problem with trying to present any sort of
font API in Cairo that allows for advanced text layout is one
of level mismatch. On Unix, Pango contains code to parse
OpenType tables, etc; on Win32 it just calls Uniscribe. 
So, it's hard to see what the Cairo API that would allow
writing "lay out text for CairoFont" would look like.

Regards,
					Owen






More information about the cairo mailing list