fixed font tables.
authorkramm <kramm>
Thu, 13 Jun 2002 11:46:29 +0000 (11:46 +0000)
committerkramm <kramm>
Thu, 13 Jun 2002 11:46:29 +0000 (11:46 +0000)
lib/example/Makefile
lib/example/dumpfont.c
lib/example/makefonts.cc

index fcd985f..5bf18f0 100644 (file)
@@ -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:
index 09985fa..02e109b 100644 (file)
@@ -9,8 +9,6 @@
    external files.
 
    Usage: ./dumpfont filename.swf > myfont.c
-
-   Limits: does not parse ST_DEFINEFONT2 
    
    Part of the swftools package.
 
index 370a81a..ffd99f7 100644 (file)
@@ -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;
     }