From b1c65e1ca6828ea82ee7790f22c26503b0a5e17d Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Thu, 6 May 2004 00:24:32 +0000 Subject: [PATCH] Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=536 - RFE: PS output should contain the FreeType2 version being used. --- Xprint/ps/psout.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Xprint/ps/psout.c b/Xprint/ps/psout.c index 943320197..d66374a4c 100644 --- a/Xprint/ps/psout.c +++ b/Xprint/ps/psout.c @@ -79,6 +79,10 @@ in this Software without prior written authorization from The Open Group. #include "os.h" #define USE_PSOUT_PRIVATE 1 #include "psout.h" +#ifdef XP_USE_FREETYPE +#include +#include FT_FREETYPE_H +#endif /* XP_USE_FREETYPE */ /* For VENDOR_STRING and VENDOR_RELEASE */ #include "site.h" @@ -589,9 +593,25 @@ PsOut_BeginFile(FILE *fp, char *title, int orient, int count, int plex, int res, /* GhostScript will rant about the missing BoundingBox if we use * "%!PS-Adobe-3.0 EPSF-3.0" here... */ S_Comment(psout, "%!PS-Adobe-3.0"); +#ifdef XP_USE_FREETYPE + { + FT_Int ftmajor = 0, + ftminor = 0, + ftpatch = 0; + extern FT_Library ftypeLibrary; /* defined in xc/lib/font/FreeType/ftfuncs.c */ + + FT_Library_Version(ftypeLibrary, &ftmajor, &ftminor, &ftpatch); + sprintf(buffer, + "%%%%Creator: The X Print Server's PostScript DDX " + "(%s, release %d, FreeType version %d.%d.%d)", + VENDOR_STRING, VENDOR_RELEASE, + (int)ftmajor, (int)ftminor, (int)ftpatch); + } +#else sprintf(buffer, "%%%%Creator: The X Print Server's PostScript DDX (%s, release %d)", VENDOR_STRING, VENDOR_RELEASE); +#endif /* XP_USE_FREETYPE */ S_Comment(psout, buffer); if (title)