[Cairo] Text APIs round 2
Kai Wetzel
kai.wetzel1 at freenet.de
Thu Aug 14 11:53:55 PDT 2003
On Thursday 14 August 2003 01:49, Keith Packard wrote:
[...]
> typedef struct cairo_glyph {
> cairo_font_t *font;
> FT_UInt id;
> double x;
> double y;
> } cairo_glyph_t;
>
> void
> cairo_show_glyphs (cairo_t *ct, cairo_glyph_t *glyphs, int num_glyphs);
[...]
> void
> cairo_glyph_path (cairo_t *ct, cairo_glyph_t *glyphs, int num_glyphs);
[...]
Why not drop the explicite font from the glyph struct and use the current
font ? In most cases the number of fonts in use is significantly smaller then
the number of glyphs in a given piece of text. This also makes it a little
bit more suitable for display-list construction because the font references
don't have to be dereferenced at the time the list is constructed. (In
contrast, code-points and positions can be copied directly.)
kai
More information about the cairo
mailing list