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 gmon.out to clean target
[swftools.git]
/
pdf2swf
/
font2swf.cc
diff --git
a/pdf2swf/font2swf.cc
b/pdf2swf/font2swf.cc
index
e44c0e5
..
894b7ab
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>
@@
-87,7
+96,9
@@
int args_callback_command(char*name,char*val)
#define symbolEncodingSize 256
#define zapfDingbatsEncodingSize 256
#define macRomanEncodingSize 256
#define symbolEncodingSize 256
#define zapfDingbatsEncodingSize 256
#define macRomanEncodingSize 256
+#define winAnsiEncodingSize 256
+extern char *winAnsiEncoding[winAnsiEncodingSize];
extern char *standardEncoding[standardEncodingSize];
extern char *symbolEncoding[symbolEncodingSize];
extern char *zapfDingbatsEncoding[zapfDingbatsEncodingSize];
extern char *standardEncoding[standardEncodingSize];
extern char *symbolEncoding[symbolEncodingSize];
extern char *zapfDingbatsEncoding[zapfDingbatsEncodingSize];
@@
-125,8
+136,8
@@
SWFFONT * t1font2swffont(int i)
if(!strcmp(fullname, "Nimbus Mono L Bold Oblique")) fontname = "CourierBoldItalic";
if(!strcmp(fullname, "Standard Symbols L")) fontname = "Symbol";
if(!strcmp(fullname, "Nimbus Mono L Bold Oblique")) fontname = "CourierBoldItalic";
if(!strcmp(fullname, "Standard Symbols L")) fontname = "Symbol";
- char ** encoding = standardEncoding;
- int encodingsize = standardEncodingSize;
+ char ** encoding = winAnsiEncoding;
+ int encodingsize = winAnsiEncodingSize;
printf("processing \"%s\" (\"%s\")...\n", fullname, fontname);
printf("processing \"%s\" (\"%s\")...\n", fullname, fontname);
@@
-153,10
+164,15
@@
SWFFONT * t1font2swffont(int i)
num = 0;
for(s=0;s<encodingsize;s++)
{
num = 0;
for(s=0;s<encodingsize;s++)
{
+ char charinfont=0;
if(encoding[s]) {
T1_OUTLINE*outline = font->getOutline(encoding[s], 0);
if(encoding[s]) {
T1_OUTLINE*outline = font->getOutline(encoding[s], 0);
- if(outline) num++;
+ if(outline) {num++;charinfont=1;}
}
}
+ /*if(charinfont) printf("x");
+ else printf(".");
+ if((s&15) == 15)
+ printf("\n");*/
}
wfont->maxascii = encodingsize;
}
wfont->maxascii = encodingsize;
@@
-231,7
+247,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