diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-29 17:54:26 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-29 17:54:26 +0000 |
commit | 5ecb10b137d94ff68d47de5ceb0104a846e0e7ad (patch) | |
tree | af5fac35506e1d6719ab5323a7b70110c0c3e99f /Build/source/texk/web2c/xetexdir/XeTeX_ext.c | |
parent | 3fe3757ead4069624474afe8fdfe838601acd153 (diff) |
'xetex --version' now reports library versions
git-svn-id: svn://tug.org/texlive/trunk@3011 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeX_ext.c')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index 84f295f2570..39d0d14bfd1 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -32,6 +32,11 @@ authorization from SIL International. * additional plain C extensions for XeTeX - mostly platform-neutral */ +#ifdef XETEX_OTHER +#include "xpdf/config.h" +#include "png.h" +#endif + #define EXTERN extern #include "xetexd.h" @@ -42,6 +47,11 @@ authorization from SIL International. #include "XeTeX_ext.h" +#include <ft2build.h> +#include FT_FREETYPE_H + +#include "zlib.h" + #include "TECkit_Engine.h" #include <kpathsea/c-ctype.h> @@ -165,6 +175,46 @@ string outputdriver = "xdvipdfmx -q -E"; /* else default to portable xdvipdfmx d #endif +void initversionstring(char **versions) +{ +#ifdef XETEX_OTHER + int fc_version = FcGetVersion(); +#endif + extern FT_Library gFreeTypeLibrary; /* in XeTeXFontInst_FT2 */ + FT_Int ftMajor, ftMinor, ftPatch; + if (gFreeTypeLibrary == 0 && FT_Init_FreeType(&gFreeTypeLibrary) != 0) { + fprintf(stderr, "FreeType initialization failed!\n"); + exit(9); + } + FT_Library_Version(gFreeTypeLibrary, &ftMajor, &ftMinor, &ftPatch); + + (void) asprintf(versions, + "Compiled with ICU version %s [with modifications for XeTeX]\n" + "Compiled with zlib version %s; using %s\n" + "Compiled with FreeType2 version %d.%d.%d; using %d.%d.%d\n" +#ifdef XETEX_MAC + "Using Mac OS X Carbon, Cocoa & QuickTime frameworks\n" +#else + "Compiled with fontconfig version %d.%d.%d; using %d.%d.%d\n" + "Compiled with libpng version %s; using %s\n" + "Compiled with xpdf version %s\n" +#endif + , + U_ICU_VERSION, + ZLIB_VERSION, zlib_version, + FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH, + ftMajor, ftMinor, ftPatch +#ifdef XETEX_OTHER + , + FC_VERSION / 10000, (FC_VERSION % 10000) / 100, FC_VERSION % 100, + fc_version / 10000, (fc_version % 10000) / 100, fc_version % 100, + PNG_LIBPNG_VER_STRING, png_libpng_ver, + xpdfVersion +#endif + ); +} + + extern char* gettexstring(int strNumber); void setinputfileencoding(UFILE* f, int mode, int encodingData) |