summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce25a1b)
raw | patch | inline | side by side (parent: ce25a1b)
author | dwyip <dwyip@users.sourceforge.net> | |
Thu, 25 May 2006 16:33:13 +0000 (16:33 +0000) | ||
committer | dwyip <dwyip@users.sourceforge.net> | |
Thu, 25 May 2006 16:33:13 +0000 (16:33 +0000) |
src/libnrtype/FontInstance.cpp | patch | blob | history |
index d28fb42a420cf9f35e1e3aa23c9a5d3eba0d4e72..2b9b4e13faefdb5eea4831ee4d09468330c59c70 100644 (file)
NR::Point last;
} ft2_to_liv;
+// Note: Freetype 2.2.1 redefined function signatures for functions to be placed in an
+// FT_Outline_Funcs structure. This is needed to keep backwards compatibility with the
+// 2.1.x series.
+
+/* *** BEGIN #if HACK *** */
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 2
+#define FREETYPE_VECTOR FT_Vector const
+#else
+#define FREETYPE_VECTOR FT_Vector
+#endif
+
// outline as returned by freetype -> livarot Path
// see nr-type-ft2.cpp for the freetype -> artBPath on which this code is based
-static int ft2_move_to(FT_Vector const *to, void * i_user) {
+static int ft2_move_to(FREETYPE_VECTOR *to, void * i_user) {
ft2_to_liv* user=(ft2_to_liv*)i_user;
NR::Point p(user->scale*to->x,user->scale*to->y);
// printf("m t=%f %f\n",p[0],p[1]);
return 0;
}
-static int ft2_line_to(FT_Vector const *to, void *i_user)
+static int ft2_line_to(FREETYPE_VECTOR *to, void *i_user)
{
ft2_to_liv* user=(ft2_to_liv*)i_user;
NR::Point p(user->scale*to->x,user->scale*to->y);
return 0;
}
-static int ft2_conic_to(FT_Vector const *control, FT_Vector const *to, void *i_user)
+static int ft2_conic_to(FREETYPE_VECTOR *control, FREETYPE_VECTOR *to, void *i_user)
{
ft2_to_liv* user=(ft2_to_liv*)i_user;
NR::Point p(user->scale*to->x,user->scale*to->y),c(user->scale*control->x,user->scale*control->y);
@@ -123,7 +134,7 @@ static int ft2_conic_to(FT_Vector const *control, FT_Vector const *to, void *i_u
return 0;
}
-static int ft2_cubic_to(FT_Vector const *control1, FT_Vector const *control2, FT_Vector const *to, void *i_user)
+static int ft2_cubic_to(FREETYPE_VECTOR *control1, FREETYPE_VECTOR *control2, FREETYPE_VECTOR *to, void *i_user)
{
ft2_to_liv* user=(ft2_to_liv*)i_user;
NR::Point p(user->scale*to->x,user->scale*to->y),
@@ -136,6 +147,8 @@ static int ft2_cubic_to(FT_Vector const *control1, FT_Vector const *control2, FT
}
#endif
+/* *** END #if HACK *** */
+
/*
*
*/