[swfmill] font name format
INADA Naoki
inada-n at klab.org
Thu May 22 23:35:35 PDT 2008
Wmmmm,
Wmmmm,
It may be better to remove 'pascal string' and use length and byte array to
store font name in DefineFont2/3 tag.
Does anyone have an opinion about this issue?
INADA Naoki さんは書きました:
> Hi all.
>
> The SWF File Format Specification v9 (We can read without any restrictions now!)
> says font name in DefineFont2/DefineFont3/DefineFontInfo is not null terminated.
>
> --- SWF File Format Specifiction v9 page 191 ---
> Note that font name strings in the DefineFontInfo tag are not null-terminated;
> instead their length is specified by the FontNameLen field.
> ---
>
> But spec is wrong and FontName should be null terminated according to this
> topic. < http://www.adobeforums.com/webx?13@@.59b53b2d/3 >
>
> Attached patch add null terminator to output of SWFWriter::putPString().
>
> But SWFWriter::putPString() is only used in DefineFont2/3 tag. DefineFontInfo/2 tag
> use ''data'' type to store FontName.
> Following comment is in swfmill/src/codegen/source.xml.
>
> <!--
> doesnt work for strange encodings (nibbles.swf)
> <string mode="pascal" name="name" prop="true"/>
> -->
> <byte name="nameLength"/>
> <data name="nameData" size="nameLength"/>
>
> I think it can replace nameLength and nameData into PString type. But I don't know
> what is the nibbles.swf and whether attached patch can or can't fix the problem.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
More information about the swfmill
mailing list