summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2010-01-08 18:23:34 +0100
committerGrigori Goronzy <greg@blackbox>2010-01-08 18:25:00 +0100
commit8db4a5b1b5ab6598b96092e08586f2bed8ab8f39 (patch)
tree430ab3be746c9a3cf42f36138ea1eaafad3da4fa
parent01b0e9a1bb517eeba755154264d6bebe49e8bfcb (diff)
downloadlibass-8db4a5b1b5ab6598b96092e08586f2bed8ab8f39.tar.bz2
libass-8db4a5b1b5ab6598b96092e08586f2bed8ab8f39.tar.xz
Remove support for freetype < 2.2.1
Get rid of compatibility #ifdefs and some code to support very old versions of freetype. libass now requires at least version 2.2.1.
-rw-r--r--configure.ac2
-rw-r--r--libass/ass_font.c9
-rw-r--r--libass/ass_parse.c6
3 files changed, 1 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 42523b0..bb3e5f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ AC_ARG_ENABLE([enca], AS_HELP_STRING([--disable-enca],
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])
diff --git a/libass/ass_font.c b/libass/ass_font.c
index 7d848a2..7db1f07 100644
--- a/libass/ass_font.c
+++ b/libass/ass_font.c
@@ -218,7 +218,6 @@ void ass_font_set_transform(ASS_Font *font, double scale_x,
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.;
@@ -241,9 +240,6 @@ static void face_set_size(FT_Face face, double size)
m->ascender /= mscale;
m->descender /= mscale;
m->height /= mscale;
-#else
- FT_Set_Char_Size(face, 0, double_to_d6(size), 0, 0);
-#endif
}
/**
@@ -476,10 +472,6 @@ FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font,
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);
@@ -489,7 +481,6 @@ FT_Glyph ass_font_get_glyph(void *fontconfig_priv, ASS_Font *font,
(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",
diff --git a/libass/ass_parse.c b/libass/ass_parse.c
index a5b9b59..0ccb5a2 100644
--- a/libass/ass_parse.c
+++ b/libass/ass_parse.c
@@ -123,15 +123,9 @@ void change_border(ASS_Renderer *render_priv, double border_x,
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");