freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [freetype2] master 5c8a8cb: [cff] Fix some Type 2 operato


From: Behdad Esfahbod
Subject: Re: [ft-devel] [freetype2] master 5c8a8cb: [cff] Fix some Type 2 operators in old CFF engine.
Date: Wed, 10 Feb 2016 10:35:13 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

 16-02-06 02:03 PM, Werner LEMBERG wrote:
> +        case cff_op_blend:
> +          /* this operator was removed from the Type2 specification */
> +          /* in version 16-March-2000                               */
> +          FT_TRACE4(( " blend\n" ));
> +
> +          goto Unimplemented;

Actually I have had wanted to propose implementing a "bypassing" blend
instead.  See, in Multiple Master, if there are three masters and they have
the equivalent of the following three commands respectively:

100 30 rmoveto
120 50 rmoveto
95 30 rmoveto

then the Multiple Master font encodes this like this:

100 30 20 –5 20 0 2 blend rmoveto

that essentially is;

100 30 (120-100) (95-100) (50-30) (30-3) 2 blend rmoveto

The "2" is the number of operands to be blended.  So, a bypassing blend will
just pop the number of operands, then pop everything else, leaving the
expected number of operands (100, 30 in the example) on the stack.

This will make MM CFF fonts still work as their base font, as opposed to
rendering completely wrong.

behdad



reply via email to

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