From d4af216aee2d07affc044ef8a9f7fb4c408c44cd Mon Sep 17 00:00:00 2001 From: kramm Date: Thu, 13 Jun 2002 11:46:29 +0000 Subject: [PATCH] fixed font tables. --- lib/example/Makefile | 2 +- lib/example/dumpfont.c | 2 -- lib/example/makefonts.cc | 20 ++++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/example/Makefile b/lib/example/Makefile index fcd985f..5bf18f0 100644 --- a/lib/example/Makefile +++ b/lib/example/Makefile @@ -62,7 +62,7 @@ zlibtest: $(RFXSWF) zlibtest.o makefonts: $(RFXSWF) makefonts.o ../../pdf2swf/swfoutput.o $(CXX) -o makefonts makefonts.o ../../pdf2swf/swfoutput.o \ - ../../pdf2swf/spline.o ../librfxswf.a -lt1 $(LDLIBS) \ + ../../pdf2swf/spline.o ../../pdf2swf/encodings.o ../librfxswf.a -lt1 $(LDLIBS) \ ../../pdf2swf/xpdf/libpdf.a $(DBFLAGS) clean: diff --git a/lib/example/dumpfont.c b/lib/example/dumpfont.c index 09985fa..02e109b 100644 --- a/lib/example/dumpfont.c +++ b/lib/example/dumpfont.c @@ -9,8 +9,6 @@ external files. Usage: ./dumpfont filename.swf > myfont.c - - Limits: does not parse ST_DEFINEFONT2 Part of the swftools package. diff --git a/lib/example/makefonts.cc b/lib/example/makefonts.cc index 370a81a..ffd99f7 100644 --- a/lib/example/makefonts.cc +++ b/lib/example/makefonts.cc @@ -20,15 +20,15 @@ extern "C" { #include "../../pdf2swf/swfoutput.h" #include "../../pdf2swf/spline.h" -#define standardEncodingSize 335 -#define symbolEncodingSize 257 -#define zapfDingbatsEncodingSize 270 +#define standardEncodingSize 256 +#define symbolEncodingSize 256 +#define zapfDingbatsEncodingSize 256 #define macRomanEncodingSize 256 -extern char *standardEncodingNames[standardEncodingSize]; -extern char *symbolEncodingNames[symbolEncodingSize]; -extern char *zapfDingbatsEncodingNames[zapfDingbatsEncodingSize]; -extern char *macRomanEncodingNames[macRomanEncodingSize]; +extern char *standardEncoding[standardEncodingSize]; +extern char *symbolEncoding[symbolEncodingSize]; +extern char *zapfDingbatsEncoding[zapfDingbatsEncodingSize]; +extern char *macRomanEncoding[macRomanEncodingSize]; char*DATADIR = "/usr/local/share/swftools"; @@ -48,17 +48,17 @@ SWFFONT * t1font2swffont(int i) float underline = T1_GetUnderlinePosition(i); BBox bbox = T1_GetFontBBox(i); - char ** encoding = standardEncodingNames; + char ** encoding = standardEncoding; int encodingsize = standardEncodingSize; printf("processing \"%s\"...\n", fullname); if(strstr(fullname, "Dingbats")) {// Zapf Dingbats - encoding = zapfDingbatsEncodingNames; + encoding = zapfDingbatsEncoding; encodingsize = zapfDingbatsEncodingSize; } else if(strstr(fullname, "Symbol")) {// Symbol - encoding = symbolEncodingNames; + encoding = symbolEncoding; encodingsize = zapfDingbatsEncodingSize; } -- 1.7.10.4