[cairo-commit] configure.ac src/cairo-ft-font.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Jan 16 00:29:24 UTC 2018
configure.ac | 2 +-
src/cairo-ft-font.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 5795ac9d90c4927e9826cf49687a9f84628d9974
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jan 15 19:28:56 2018 -0500
Fix compile with older FreeType without FT_Get_Var_Design_Coordinates
diff --git a/configure.ac b/configure.ac
index cfda79aec..fb8b6b698 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 69e12a0e5..1f726bc2a 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -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:
More information about the cairo-commit
mailing list