AC_ARG_ENABLE([fontconfig], AS_HELP_STRING([--disable-fontconfig],
[disable fontconfig support @<:@default=check@:>@]))
-PKG_CHECK_MODULES([FREETYPE], freetype2 >= 9.6.3, [
+PKG_CHECK_MODULES([FREETYPE], freetype2 >= 9.10.3, [
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
LIBS="$LIBS $FREETYPE_LIBS"
AC_DEFINE(CONFIG_FREETYPE, 1, [found freetype2 via pkg-config])
static void face_set_size(FT_Face face, double size)
{
-#if (FREETYPE_MAJOR > 2) || ((FREETYPE_MAJOR == 2) && (FREETYPE_MINOR > 1))
TT_HoriHeader *hori = FT_Get_Sfnt_Table(face, ft_sfnt_hhea);
TT_OS2 *os2 = FT_Get_Sfnt_Table(face, ft_sfnt_os2);
double mscale = 1.;
m->ascender /= mscale;
m->descender /= mscale;
m->height /= mscale;
-#else
- FT_Set_Char_Size(face, 0, double_to_d6(size), 0, 0);
-#endif
}
/**
index);
return 0;
}
-#if (FREETYPE_MAJOR > 2) || \
- ((FREETYPE_MAJOR == 2) && (FREETYPE_MINOR >= 2)) || \
- ((FREETYPE_MAJOR == 2) && (FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 10))
-// FreeType >= 2.1.10 required
if (!(face->style_flags & FT_STYLE_FLAG_ITALIC) &&
(font->desc.italic > 55)) {
FT_GlyphSlot_Oblique(face->glyph);
(font->desc.bold > 80)) {
ass_glyph_embolden(face->glyph);
}
-#endif
error = FT_Get_Glyph(face->glyph, &glyph);
if (error) {
ass_msg(font->library, MSGL_WARN, "Error loading glyph, index %d",
if (bord > 0 && border_x == border_y) {
if (!render_priv->state.stroker) {
int error;
-#if (FREETYPE_MAJOR > 2) || ((FREETYPE_MAJOR == 2) && (FREETYPE_MINOR > 1))
error =
FT_Stroker_New(render_priv->ftlibrary,
&render_priv->state.stroker);
-#else // < 2.2
- error =
- FT_Stroker_New(render_priv->state.font->faces[0]->
- memory, &render_priv->state.stroker);
-#endif
if (error) {
ass_msg(render_priv->library, MSGL_V,
"failed to get stroker");