mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-25 11:50:16 +01:00
Fix compile with older FreeType without FT_Get_Var_Design_Coordinates
This commit is contained in:
parent
b7f313a8d2
commit
5795ac9d90
2 changed files with 5 additions and 1 deletions
|
|
@ -574,7 +574,7 @@ if test "x$use_ft" = "xyes"; then
|
|||
LIBS="$LIBS $ft_LIBS"
|
||||
CFLAGS="$CFLAGS $ft_CFLAGS"
|
||||
|
||||
AC_CHECK_FUNCS(FT_Get_X11_Font_Format FT_GlyphSlot_Embolden FT_GlyphSlot_Oblique FT_Load_Sfnt_Table FT_Library_SetLcdFilter FT_Done_MM_Var)
|
||||
AC_CHECK_FUNCS(FT_Get_X11_Font_Format FT_GlyphSlot_Embolden FT_GlyphSlot_Oblique FT_Load_Sfnt_Table FT_Library_SetLcdFilter FT_Get_Var_Design_Coordinates FT_Done_MM_Var)
|
||||
|
||||
LIBS="$_save_libs"
|
||||
CFLAGS="$_save_cflags"
|
||||
|
|
|
|||
|
|
@ -451,6 +451,7 @@ _cairo_ft_unscaled_font_init (cairo_ft_unscaled_font_t *unscaled,
|
|||
unscaled->have_color = FT_HAS_COLOR (face) != 0;
|
||||
unscaled->have_color_set = TRUE;
|
||||
|
||||
#ifdef HAVE_FT_GET_VAR_DESIGN_COORDINATES
|
||||
{
|
||||
FT_MM_Var *ft_mm_var;
|
||||
if (0 == FT_Get_MM_Var (face, &ft_mm_var))
|
||||
|
|
@ -460,6 +461,7 @@ _cairo_ft_unscaled_font_init (cairo_ft_unscaled_font_t *unscaled,
|
|||
FT_Get_Var_Design_Coordinates (face, ft_mm_var->num_axis, unscaled->variations);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
char *filename_copy;
|
||||
|
||||
|
|
@ -2363,6 +2365,7 @@ skip:
|
|||
}
|
||||
|
||||
current_coords = malloc (sizeof (FT_Fixed) * ft_mm_var->num_axis);
|
||||
#ifdef HAVE_FT_GET_VAR_DESIGN_COORDINATES
|
||||
ret = FT_Get_Var_Design_Coordinates (face, ft_mm_var->num_axis, current_coords);
|
||||
if (ret == 0) {
|
||||
for (i = 0; i < ft_mm_var->num_axis; i++) {
|
||||
|
|
@ -2372,6 +2375,7 @@ skip:
|
|||
if (i == ft_mm_var->num_axis)
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
FT_Set_Var_Design_Coordinates (face, ft_mm_var->num_axis, coords);
|
||||
done:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue