diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-09-29 11:34:19 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-09-29 11:34:19 -0400 |
commit | 1310df44edcf0b9fee648c8f8688d4a1177cde68 (patch) | |
tree | 41569e93e7fd9286e7f51a8db6ff92636986c4fe /src/cairo-user-font.c | |
parent | 41c66a9dfa9f4e7b9839db9dc362f5fa48797561 (diff) | |
download | cairo-1310df44edcf0b9fee648c8f8688d4a1177cde68.tar.gz |
[text_to_glyphs] Further enhance the docs
The most complex public cairo API deserves more doc love...
Diffstat (limited to 'src/cairo-user-font.c')
-rw-r--r-- | src/cairo-user-font.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c index 4feb0cec3..616eff048 100644 --- a/src/cairo-user-font.c +++ b/src/cairo-user-font.c @@ -288,6 +288,7 @@ _cairo_user_text_to_glyphs (void *abstract_font, if (face->scaled_font_methods.text_to_glyphs) { int i; + cairo_glyph_t *orig_glyphs = *glyphs; int orig_num_glyphs = *num_glyphs; status = face->scaled_font_methods.text_to_glyphs (&scaled_font->base, @@ -299,6 +300,10 @@ _cairo_user_text_to_glyphs (void *abstract_font, return status; if (*num_glyphs < 0) { + if (orig_glyphs != *glyphs) { + cairo_glyph_free (*glyphs); + *glyphs = orig_glyphs; + } *num_glyphs = orig_num_glyphs; return CAIRO_INT_STATUS_UNSUPPORTED; } |