mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 02:38:07 +02:00
[ft] Remove ancient check for FT_Bitmap_Size.y_ppem
That member is available in the version of FreeType we require.
This commit is contained in:
parent
867c876b0e
commit
1404ed9692
2 changed files with 1 additions and 17 deletions
|
|
@ -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 <ft2build.h>
|
||||
#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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue