Check is_synthetic() font backend exists before calling it

This commit is contained in:
Adrian Johnson 2010-11-23 23:26:49 +10:30
parent 12b1cbb07e
commit 8db239660f
2 changed files with 2 additions and 2 deletions

View file

@ -1907,7 +1907,7 @@ _cairo_cff_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
return CAIRO_INT_STATUS_UNSUPPORTED;
/* We need to use a fallback font generated from the synthesized outlines. */
if (backend->is_synthetic (scaled_font_subset->scaled_font))
if (backend->is_synthetic && backend->is_synthetic (scaled_font_subset->scaled_font))
return CAIRO_INT_STATUS_UNSUPPORTED;
data_length = 0;

View file

@ -157,7 +157,7 @@ _cairo_truetype_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
*/
/* We need to use a fallback font generated from the synthesized outlines. */
if (backend->is_synthetic (scaled_font_subset->scaled_font))
if (backend->is_synthetic && backend->is_synthetic (scaled_font_subset->scaled_font))
return CAIRO_INT_STATUS_UNSUPPORTED;
size = sizeof (tt_head_t);