|
From: Axel H. <ax...@3d...> - 2007-11-09 17:33:32
|
Klaus Rechert schrieb:
>Hi Alex,
>
>actually it is not recommended to use loadSWFFontTTF().
>
>newSWFFont_fromFile(char *filename) is the recommended interface. It
>determines the file format by its fingerprint, which is much safer than
>relying on the file extension.
>
>I fixed Font.xs in CVS to:
>
>if (strncasecmp(filename+len-4, ".fdb", 4) == 0
> || strncmp(filename+len-4, ".ttf", 4) == 0 )
>{
> RETVAL = newSWFFont_fromFile(filename);
>}
>else
> RETVAL = newSWFBrowserFont(filename);
>
>
>Please test...
> Klaus
>
>
ok - works
>On Friday 09 November 2007 16:24:19 Axel Huizinga wrote:
>
>
>>Hi,
>>
>>just updated the perl_ext to support ttf fonts.
>>Changed the Fonts.xs by inserting an additonal
>>
>> else if(strncmp(filename+len-4, ".ttf", 4) == 0 ){
>> if (!(f = fopen(filename, "rb"))) {
>> fprintf(stderr, "Unable to open ttf file %s\n", filename);
>> XSRETURN_UNDEF;
>> }
>> else{
>> RETVAL = loadSWFFontTTF(filename);
>> fclose(f);
>> }
>> }
>>
>>into SWFFont_new
>>
>>and it works for me.
>>
>>for Adding addFont to Movie.xs
>>and writing the SWFFontChar.xs still need some advice from a perl guru...
>>
>>
What about addFont and SWFFontChar.xs? Can you give me advice how to
write this?
Axel
|