git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f397c78
)
added debugging messages to getCharID().
author
kramm
<kramm>
Tue, 21 Sep 2004 13:03:57 +0000
(13:03 +0000)
committer
kramm
<kramm>
Tue, 21 Sep 2004 13:03:57 +0000
(13:03 +0000)
pdf2swf/swfoutput.cc
patch
|
blob
|
history
diff --git
a/pdf2swf/swfoutput.cc
b/pdf2swf/swfoutput.cc
index
3511eee
..
b4c1229
100644
(file)
--- a/
pdf2swf/swfoutput.cc
+++ b/
pdf2swf/swfoutput.cc
@@
-1144,6
+1144,7
@@
int getCharID(SWFFONT *font, int charnr, char *charname, int u)
if(charname) {
for(t=0;t<font->numchars;t++) {
if(font->glyphnames[t] && !strcmp(font->glyphnames[t],charname)) {
if(charname) {
for(t=0;t<font->numchars;t++) {
if(font->glyphnames[t] && !strcmp(font->glyphnames[t],charname)) {
+ msg("<debug> Char [%d,>%s<,%d] maps to %d\n", charnr, charname, u, t);
return t;
}
}
return t;
}
}
@@
-1151,6
+1152,7
@@
int getCharID(SWFFONT *font, int charnr, char *charname, int u)
we can find the capitalized version */
for(t=0;t<font->numchars;t++) {
if(font->glyphnames[t] && !strcasecmp(font->glyphnames[t],charname)) {
we can find the capitalized version */
for(t=0;t<font->numchars;t++) {
if(font->glyphnames[t] && !strcasecmp(font->glyphnames[t],charname)) {
+ msg("<debug> Char [%d,>>%s<<,%d] maps to %d\n", charnr, charname, u, t);
return t;
}
}
return t;
}
}
@@
-1159,11
+1161,13
@@
int getCharID(SWFFONT *font, int charnr, char *charname, int u)
if(u>0) {
/* try to use the unicode id */
if(u>=0 && u<font->maxascii && font->ascii2glyph[u]>=0) {
if(u>0) {
/* try to use the unicode id */
if(u>=0 && u<font->maxascii && font->ascii2glyph[u]>=0) {
+ msg("<debug> Char [%d,%s,>%d<] maps to %d\n", charnr, charname, u, font->ascii2glyph[u]);
return font->ascii2glyph[u];
}
}
if(charnr>=0 && charnr<font->numchars) {
return font->ascii2glyph[u];
}
}
if(charnr>=0 && charnr<font->numchars) {
+ msg("<debug> Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr);
return charnr;
}
return charnr;
}
@@
-1172,6
+1176,7
@@
int getCharID(SWFFONT *font, int charnr, char *charname, int u)
is US-ASCII based. It's needed for fonts which return broken unicode
indices */
if(charnr>=0 && charnr<font->maxascii && font->ascii2glyph[charnr]>=0) {
is US-ASCII based. It's needed for fonts which return broken unicode
indices */
if(charnr>=0 && charnr<font->maxascii && font->ascii2glyph[charnr]>=0) {
+ msg("<debug> Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, font->ascii2glyph[charnr]);
return font->ascii2glyph[charnr];
}
}
return font->ascii2glyph[charnr];
}
}