|
|
|
@ -617,18 +617,22 @@ hb_ft_font_create (FT_Face ft_face, |
|
|
|
|
ft_face->size->metrics.y_ppem); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_FT_GET_VAR_BLEND_COORDINATES |
|
|
|
|
FT_MM_Var *mm_var = NULL; |
|
|
|
|
if (!FT_Get_MM_Var (ft_face, &mm_var)) { |
|
|
|
|
if (!FT_Get_MM_Var (ft_face, &mm_var)) |
|
|
|
|
{ |
|
|
|
|
FT_Fixed coords[mm_var->num_axis]; |
|
|
|
|
int hbCoords[mm_var->num_axis]; |
|
|
|
|
if (!FT_Get_Var_Blend_Coordinates (ft_face, mm_var->num_axis, coords)) { |
|
|
|
|
for (int i = 0; i < mm_var->num_axis; ++i) { |
|
|
|
|
if (!FT_Get_Var_Blend_Coordinates (ft_face, mm_var->num_axis, coords)) |
|
|
|
|
{ |
|
|
|
|
for (int i = 0; i < mm_var->num_axis; ++i) |
|
|
|
|
hbCoords[i] = coords[i] >> 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
hb_font_set_var_coords_normalized (font, hbCoords, mm_var->num_axis); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
free (mm_var); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
return font; |
|
|
|
|
} |
|
|
|
|