diff --git a/configure.ac b/configure.ac index f523284ff..fc8d3b196 100644 --- a/configure.ac +++ b/configure.ac @@ -522,13 +522,6 @@ if test "x$use_ft" = "xyes"; then _save_cflags="$CFLAGS" LIBS="$LIBS $ft_LIBS" CFLAGS="$CFLAGS $ft_CFLAGS" - AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem, - HAVE_FT_BITMAP_SIZE_Y_PPEM=1, - HAVE_FT_BITMAP_SIZE_Y_PPEM=0, - [#include - #include FT_FREETYPE_H]) - AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM, - [FT_Bitmap_Size structure includes y_ppem field]) AC_CHECK_FUNCS(FT_Get_X11_Font_Format FT_GlyphSlot_Embolden FT_GlyphSlot_Oblique FT_Load_Sfnt_Table FT_Library_SetLcdFilter) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 75cc132e7..0580faca2 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -811,11 +811,7 @@ _cairo_ft_unscaled_font_set_scale (cairo_ft_unscaled_font_t *unscaled, int best_i = 0; for (i = 0; i < unscaled->face->num_fixed_sizes; i++) { -#if HAVE_FT_BITMAP_SIZE_Y_PPEM double size = unscaled->face->available_sizes[i].y_ppem / 64.; -#else - double size = unscaled->face->available_sizes[i].height; -#endif double distance = fabs (size - sf.y_scale); if (distance <= min_distance) { @@ -823,16 +819,11 @@ _cairo_ft_unscaled_font_set_scale (cairo_ft_unscaled_font_t *unscaled, best_i = i; } } -#if HAVE_FT_BITMAP_SIZE_Y_PPEM error = FT_Set_Char_Size (unscaled->face, unscaled->face->available_sizes[best_i].x_ppem, unscaled->face->available_sizes[best_i].y_ppem, 0, 0); - if (error) -#endif - error = FT_Set_Pixel_Sizes (unscaled->face, - unscaled->face->available_sizes[best_i].width, - unscaled->face->available_sizes[best_i].height); + if (error) return _cairo_error (CAIRO_STATUS_NO_MEMORY); }