[cairo] Cairo/FreeType integration [Advanced]
Ian Britten
britten at caris.com
Thu Oct 9 09:00:07 PDT 2008
Behdad Esfahbod wrote:
>> At the point I'm trying to integrate Cairo into all this, I
>> basically have an FT_Face, an FT_Glyph, (X,Y) position, angle, etc,
>> I'm just not sure if I can make use of all that, with the existing
>> (public) interfaces from Cairo. For example, when looking at
>> http://www.cairographics.org/manual/cairo-FreeType-Fonts.html, I
>> don't see any way to work with an existing FT_Glyph...
>
> Cairo's FreeType integration is at the level of FT_Face and glyph indices. No
> FT_Glyph involved.
Right. I'm just concerned about a couple of issues, mostly about how
Cairo is obtaining the actual FT_Glyphs
- Are you doing your own lookup/caching? We already do this (Using
the FT ImageCache), and I was thinking that it wouldn't be necessary
for Cairo to do it too (in our case).
Admittedly, it might just end up being some extra RAM/CPU overhead,
but I wasn't sure if I could bypass it and patch in at a lower
level.
- How do you obtain the actual FT_Glyph? I'm concerned that you may
not be able to get Glyphs for some of our Faces, since we use a
customized FL_Library that contains extra drivers (To support
proprietary font formats).
I'm uncertain if the FT_Face I give you connects back to our
FT_Library (and driver), or if you'll end up using your own
instance (without our driver), meaning you'd be unable to get the
correct FT_Glyph.
Anyways, I'll start by trying to use the existing interfaces, and
see where I get. I'm only asking about this stuff (Before trying it)
to hopefully avoid wasting my time by heading down the wrong path...
> If you need metrics, use cairo API for that too.
Thanks anyway, but as I mentioned earlier, we already have an
extensive framework built on ICU and FreeType to handle all that.
I only need to push stuff to Cairo - I don't think I need to ask
Cairo for any information.
As always, many thanks for any info, suggestions, etc!
Ian
More information about the cairo
mailing list