mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-07 19:30:47 -04:00
79 lines
2.2 KiB
Plaintext
79 lines
2.2 KiB
Plaintext
$NetBSD: patch-ai,v 1.2 2014/03/22 16:50:29 spz Exp $
|
|
|
|
make it deal gracefully with various freetype versions
|
|
|
|
--- src/generic/dcpsg.cpp.orig 2003-09-21 11:31:45.000000000 +0000
|
|
+++ src/generic/dcpsg.cpp
|
|
@@ -1132,7 +1132,8 @@ void wxPostScriptDC::SetBrush( const wxB
|
|
|
|
#include "wx/fontutil.h"
|
|
#include <pango/pangoft2.h>
|
|
-#include <freetype/ftglyph.h>
|
|
+#include <ft2build.h>
|
|
+#include FT_GLYPH_H
|
|
|
|
#ifndef FT_Outline_Decompose
|
|
FT_EXPORT( FT_Error ) FT_Outline_Decompose(
|
|
@@ -1146,8 +1147,13 @@ struct _OutlineInfo {
|
|
FILE *file;
|
|
};
|
|
|
|
+#if (FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 2) || FREETYPE_MAJOR >= 2
|
|
+static int paps_move_to( const FT_Vector* to,
|
|
+ void *user_data)
|
|
+#else
|
|
static int paps_move_to( FT_Vector* to,
|
|
void *user_data)
|
|
+#endif
|
|
{
|
|
OutlineInfo *outline_info = (OutlineInfo*)user_data;
|
|
fprintf(outline_info->file, "%d %d moveto\n",
|
|
@@ -1156,8 +1162,13 @@ static int paps_move_to( FT_Vector* to,
|
|
return 0;
|
|
}
|
|
|
|
+#if (FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 2) || FREETYPE_MAJOR >= 2
|
|
+static int paps_line_to( const FT_Vector* to,
|
|
+ void *user_data)
|
|
+#else
|
|
static int paps_line_to( FT_Vector* to,
|
|
void *user_data)
|
|
+#endif
|
|
{
|
|
OutlineInfo *outline_info = (OutlineInfo*)user_data;
|
|
fprintf(outline_info->file, "%d %d lineto\n",
|
|
@@ -1166,9 +1177,15 @@ static int paps_line_to( FT_Vector* to,
|
|
return 0;
|
|
}
|
|
|
|
+#if (FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 2) || FREETYPE_MAJOR >= 2
|
|
+static int paps_conic_to( const FT_Vector* control,
|
|
+ const FT_Vector* to,
|
|
+ void *user_data)
|
|
+#else
|
|
static int paps_conic_to( FT_Vector* control,
|
|
FT_Vector* to,
|
|
void *user_data)
|
|
+#endif
|
|
{
|
|
OutlineInfo *outline_info = (OutlineInfo*)user_data;
|
|
fprintf(outline_info->file, "%d %d %d %d conicto\n",
|
|
@@ -1179,10 +1196,17 @@ static int paps_conic_to( FT_Vector* co
|
|
return 0;
|
|
}
|
|
|
|
+#if (FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 2) || FREETYPE_MAJOR >= 2
|
|
+static int paps_cubic_to( const FT_Vector* control1,
|
|
+ const FT_Vector* control2,
|
|
+ const FT_Vector* to,
|
|
+ void *user_data)
|
|
+#else
|
|
static int paps_cubic_to( FT_Vector* control1,
|
|
FT_Vector* control2,
|
|
FT_Vector* to,
|
|
void *user_data)
|
|
+#endif
|
|
{
|
|
OutlineInfo *outline_info = (OutlineInfo*)user_data;
|
|
fprintf(outline_info->file,
|