-#if wxUSE_PANGO
-
-#define PANGO_ENABLE_ENGINE
-
-#ifdef __WXGTK20__
-#include "wx/gtk/private.h"
-#include "gtk/gtk.h"
-#else
-#include "wx/x11/private.h"
-#endif
-
-#include "wx/fontutil.h"
-#include <pango/pangoft2.h>
-#include <freetype/ftglyph.h>
-
-#ifndef FT_Outline_Decompose
- FT_EXPORT( FT_Error ) FT_Outline_Decompose(
- FT_Outline* outline,
- const FT_Outline_Funcs* interface,
- void* user );
-#endif
-
-typedef struct _OutlineInfo OutlineInfo;
-struct _OutlineInfo {
- FILE *file;
-};
-
-static int paps_move_to( FT_Vector* to,
- void *user_data)
-{
- OutlineInfo *outline_info = (OutlineInfo*)user_data;
- fprintf(outline_info->file, "%d %d moveto\n",
- (int)to->x ,
- (int)to->y );
- return 0;
-}
-
-static int paps_line_to( FT_Vector* to,
- void *user_data)
-{
- OutlineInfo *outline_info = (OutlineInfo*)user_data;
- fprintf(outline_info->file, "%d %d lineto\n",
- (int)to->x ,
- (int)to->y );
- return 0;
-}
-
-static int paps_conic_to( FT_Vector* control,
- FT_Vector* to,
- void *user_data)
-{
- OutlineInfo *outline_info = (OutlineInfo*)user_data;
- fprintf(outline_info->file, "%d %d %d %d conicto\n",
- (int)control->x ,
- (int)control->y ,
- (int)to->x ,
- (int)to->y );
- return 0;
-}
-
-static int paps_cubic_to( FT_Vector* control1,
- FT_Vector* control2,
- FT_Vector* to,
- void *user_data)
-{
- OutlineInfo *outline_info = (OutlineInfo*)user_data;
- fprintf(outline_info->file,
- "%d %d %d %d %d %d curveto\n",
- (int)control1->x ,
- (int)control1->y ,
- (int)control2->x ,
- (int)control2->y ,
- (int)to->x ,
- (int)to->y );
- return 0;
-}
-
-void draw_bezier_outline(FILE *file,
- FT_Face face,
- FT_UInt glyph_index,
- int pos_x,
- int pos_y,
- double scale_x,
- double scale_y )
-{
- FT_Int load_flags = FT_LOAD_NO_BITMAP;
- FT_Glyph glyph;
-
- FT_Outline_Funcs outlinefunc =
- {
- paps_move_to,
- paps_line_to,
- paps_conic_to,
- paps_cubic_to
- };
-
- OutlineInfo outline_info;
- outline_info.file = file;
-
- fprintf(file, "gsave\n");
- fprintf(file, "%d %d translate\n", pos_x, pos_y );
-
- // We have to replace the "," from the German
- // locale with the Englich "." for PostScript
- char buf[100];
- sprintf(buf, "%.8f %.8f scale\n", scale_x, scale_y );
- for (size_t i = 0; i < strlen(buf); i++)
- if (buf[i] == ',') buf[i] = '.';
- fprintf(file, buf);
-
- FT_Load_Glyph(face, glyph_index, load_flags);
- FT_Get_Glyph (face->glyph, &glyph);
- FT_Outline_Decompose (&(((FT_OutlineGlyph)glyph)->outline),
- &outlinefunc, &outline_info);
- fprintf(file, "closepath fill grestore\n");
-
- FT_Done_Glyph (glyph);
-}
-
-#endif
-
-void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y )