mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-28 00:59:16 +01:00
[cairo] Version-check the variations code
This commit is contained in:
1 parent
a180ae43ce
commit
f11271cc03
1 file changed
+2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user