git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added MD5 support.
[swftools.git]
/
pdf2swf
/
font2swf.cc
diff --git
a/pdf2swf/font2swf.cc
b/pdf2swf/font2swf.cc
index
3f351f1
..
3b2d2e4
100644
(file)
--- a/
pdf2swf/font2swf.cc
+++ b/
pdf2swf/font2swf.cc
@@
-6,10
+6,19
@@
Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
- This file is distributed under the GPL, see file COPYING for details
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-*/
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <stdio.h>
#include <unistd.h>
#include <stdio.h>
#include <unistd.h>
@@
-69,6
+78,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("\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)
printf("\t-V , --version\t\t Print program version and exit\n");
}
int args_callback_command(char*name,char*val)
@@
-230,7
+240,7
@@
SWFFONT * t1font2swffont(int i)
SRECT bbox;
shape2 = swf_ShapeToShape2(shape);
if(!shape2) { fprintf(stderr, "Shape parse error\n");exit(1);}
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
swf_Shape2Free(shape2);
wfont->layout->bounds[num] = bbox;
//wfont->glyph[num].advance = (int)(width/6.4); // 128/20
@@
-251,6
+261,10
@@
int main(int argc, char ** argv)
char cwd[128];
getcwd(cwd, 128);
processargs(argc, 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");
//TODO: use tempnam here. Check if environment already contains a
//T1LIB_CONFIG.
putenv( "T1LIB_CONFIG=/tmp/t1lib.config.tmp");