[cairo] Re: Public api for getting cairo_glyph_t

Owen Taylor otaylor at redhat.com
Mon Jan 9 07:25:29 PST 2006


On Mon, 2006-01-09 at 08:31 -0600, Mike Emmel wrote:
> On 1/9/06, Mike Emmel <mike.emmel at gmail.com> wrote:
> > This may be stupid but I was looking for a public api for getting the
> > cairo_glyph_t
> > or the index. I'm just not seeing anything. Is there and api ?
> >
> > Mike
> >
> 
> I might add before I get flamed ...
> 
>  Cairo doesn't expose any way of converting input text
>  * into glyphs, so in order to use the Cairo interfaces that take
>  * arrays of glyphs, you must directly access the appropriate
>  * underlying font system.
> 
> I understand this but then at this point there seems to be no official way
> to access the underlying font system to ensure the index's are correct without
> making a lot of assumptions. I saw how pango does it and it seems to
> be a matter of it works because pango knows the details of the
> implementation.

There are publically exported ways of doing it for each backend. For
the FreeType backend, you get the FT_Face, and use the FreeType APIs
to do the conversion. Similarly for the Win32 backend and so forth.

						Owen




More information about the cairo mailing list