int s,num;
char**charnames;
char**charname;
+ char*encoding[256];
int c;
+ int t;
if(!t1lib_initialized) {
T1_SetBitmapPad(16);
T1_LoadFont(nr);
charnames = T1_GetAllCharNames(nr);
+ if(!charnames) {
+ fprintf(stderr, "No Charnames record- not a Type1 Font?\n");
+ return 0;
+ }
angle = T1_GetItalicAngle(nr);
fontname = T1_GetFontName(nr);
charname = charnames;
while(*charname) {
charname++;
+ if(num<256) {
+ if(*charname) encoding[num] = strdup(*charname);
+ else encoding[num] = strdup(".notdef");
+ }
num++;
}
+ for(t=num;t<256;t++)
+ encoding[t] = strdup(".notdef");
+
+ //T1_ReencodeFont(nr, encoding);
font->maxascii = num;
font->numchars = num;
swf_Shape01DrawerInit(&draw, 0);
+ printf("Char %d (%08x)", c, outline);
while(outline) {
pos.x += (outline->dest.x/(float)0xffff);
pos.y += (outline->dest.y/(float)0xffff);
}
last = pos;
outline = outline->link;
+ printf("(%f,%f) ", pos.x, pos.y);
}
+ printf("\n");
draw.finish(&draw);
}
charname++;
}
+ T1_DeleteFont(nr);
+
+ for(t=0;t<256;t++)
+ free(encoding[t]);
return font;
}
if(is_swf) {
return swf_ReadFont(filename);
}
+
+
+ return swf_LoadT1Font(filename);
+
#if defined(HAVE_FREETYPE)
return swf_LoadTrueTypeFont(filename);
#elif defined(HAVE_T1LIB)