diff --git a/src/hb-cairo.cc b/src/hb-cairo.cc index 90f3030ec..656a9d4f9 100644 --- a/src/hb-cairo.cc +++ b/src/hb-cairo.cc @@ -379,6 +379,7 @@ hb_cairo_init_scaled_font (cairo_scaled_font_t *scaled_font, &hb_cairo_face_user_data_key); font = hb_font_create (face); +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,16,0) cairo_font_options_t *font_options = cairo_font_options_create (); // Set variations @@ -397,6 +398,7 @@ hb_cairo_init_scaled_font (cairo_scaled_font_t *scaled_font, hb_font_set_variations (font, &vars[0], vars.length); cairo_font_options_destroy (font_options); +#endif // Set scale; Note: should NOT set slant, or we'll double-slant. unsigned scale_factor = hb_cairo_font_face_get_scale_factor (font_face);