summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2008-11-02 11:42:33 +1030
committerAdrian Johnson <ajohnson@redneon.com>2008-11-02 21:21:59 +1030
commit6434cddb899d750b815d71f8f51ae3e4568dd3c0 (patch)
treef61b3b6aa2c04b8e36a55a7c4952d0718bea86e0 /src
parent710f7d30d348517602293f123525aef7677d69cf (diff)
type1-subset: return unsupported on FT errors
and let type1-fallback handle it. This fixes the bug reported by Peter Weilbacher in http://lists.cairographics.org/archives/cairo/2008-October/015569.html
Diffstat (limited to 'src')
-rw-r--r--src/cairo-type1-subset.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index ddc4ce76..bbff33d9 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -553,18 +553,14 @@ cairo_type1_font_subset_get_glyph_names_and_widths (cairo_type1_font_subset_t *f
error = FT_Load_Glyph (font->face, i,
FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING |
FT_LOAD_NO_BITMAP | FT_LOAD_IGNORE_TRANSFORM);
- if (error != 0) {
- printf ("could not load glyph %d\n", i);
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- }
+ if (error != 0)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
font->glyphs[i].width = font->face->glyph->metrics.horiAdvance;
error = FT_Get_Glyph_Name(font->face, i, buffer, sizeof buffer);
- if (error != 0) {
- printf ("could not get glyph name for glyph %d\n", i);
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
- }
+ if (error != 0)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
font->glyphs[i].name = strdup (buffer);
if (font->glyphs[i].name == NULL)