* added freetype support in ttf2pt1
[swftools.git] / pdf2swf / font2swf.cc
index 3f351f1..b0031ae 100644 (file)
@@ -69,6 +69,7 @@ void args_callback_usage(char*name)
     printf("\n");
     printf("\t-h , --help\t\t Print help and exit\n");
     printf("\t-o , --output filename\t set output filename\n");
+    printf("\t-v , --verbose\t\t Be more verbose\n");
     printf("\t-V , --version\t\t Print program version and exit\n");
 }
 int args_callback_command(char*name,char*val)
@@ -230,7 +231,7 @@ SWFFONT * t1font2swffont(int i)
                SRECT bbox;
                shape2 = swf_ShapeToShape2(shape);
                if(!shape2) { fprintf(stderr, "Shape parse error\n");exit(1);}
-               bbox = swf_GetShapeBoundingBox(shape2->lines);
+               bbox = swf_GetShapeBoundingBox(shape2);
                swf_Shape2Free(shape2);
                wfont->layout->bounds[num] = bbox;
                //wfont->glyph[num].advance = (int)(width/6.4); // 128/20
@@ -251,6 +252,10 @@ int main(int argc, char ** argv)
   char cwd[128];
   getcwd(cwd, 128);
   processargs(argc, argv);
+  if(!all && !filenum) {
+      fprintf(stderr, "You must supply a filename.\n");
+      exit(1);
+  }
   //TODO: use tempnam here. Check if environment already contains a
   //T1LIB_CONFIG.
   putenv( "T1LIB_CONFIG=/tmp/t1lib.config.tmp");