freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] Illegal cff font


From: George Williams
Subject: [ft-devel] Illegal cff font
Date: 05 Oct 2005 11:38:37 -0700

Someone reported the following illegal cff font as a fontforge bug. It
contains the following oddities:
        * It has a .pfb extension (even though it is a .cff)
        * The cff Name Index contains one fontname which starts with
                the utf8 encoding of the byte order mark. (PS says 
                fontnames should be printable ASCII)
        * A number of the glyphs use type1 flex conventions (even though
                it is a type2 font). Type2 has no callothersubr (pop,
                setcurrentpoint) operator and no place to store
                OtherSubrs in the cff.
> char strings 2: -36 16 -21 638 52 hstem 237 82 vstem 20 hmoveto 217
> 254 rmoveto 0 -86 -4 -87 -4 -86 rrcurveto 0 1 callothersubr 49 hmoveto
> 0 2 callothersubr -32 3 rmoveto 0 2 callothersubr 16 2 rmoveto 0 2
> callothersubr 16 hmoveto 0 2 callothersubr 16 hmoveto 0 2
> callothersubr 16 -2 rmoveto 0 2 callothersubr 17 -3 rmoveto 0 2
> callothersubr 50 327 -5 3 0 callothersubr pop pop setcurrentpoint ...


Both FontForge and FreeType complained about the attempt to use type1
flex conventions (well FF gave a mysterious message and failed for those
glyphs, while FreeType fails for those glyphs).

It turned out to be fairly easy to modify ff's parser to:
        * Generate a reasonable error message:-)
        * accept the flex sequences anyway.

Anyway I thought I'd pass on the example (I've no idea what generated
it) in case someone would like to modify freetype to support it.

Attachment: Optima.pfb
Description: application/font-type1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]