changeset 23339:95bc9f4905f8

FT_Request_Size does not exist in FreeType 2.1.*. Fallback to FT_Set_Char_Size.
author eugeni
date Sun, 20 May 2007 17:04:12 +0000
parents 2a66d95355f0
children 15b2b1e8a568
files libass/ass_font.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass_font.c	Sun May 20 16:10:45 2007 +0000
+++ b/libass/ass_font.c	Sun May 20 17:04:12 2007 +0000
@@ -156,6 +156,7 @@
 
 static void face_set_size(FT_Face face, double size)
 {
+#if (FREETYPE_MAJOR >= 2)
 	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.;
@@ -174,6 +175,9 @@
 	m->ascender /= mscale;
 	m->descender /= mscale;
 	m->height /= mscale;
+#else
+	FT_Set_Char_Size(face, 0, double_to_d6(size), 0, 0);
+#endif
 }
 
 /**