[truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
When points are not touched by gvar interpolation deltas, FreeType gave a slightly different result than Apple's CoreText. The OpenType working group will update the specification to document the following behaviour: If the two points with deltas to the `left' and `right' of the untouched point have the same coordinate, then the inferred delta for the untouched point should be zero. * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new behaviour.
This commit is contained in:
parent
ba40054c2d
commit
60bf264ee2
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2017-05-02 Behdad Esfahbod <behdad@behdad.org>
|
||||||
|
|
||||||
|
[truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
|
||||||
|
|
||||||
|
When points are not touched by gvar interpolation deltas, FreeType
|
||||||
|
gave a slightly different result than Apple's CoreText.
|
||||||
|
|
||||||
|
The OpenType working group will update the specification to document
|
||||||
|
the following behaviour: If the two points with deltas to the `left'
|
||||||
|
and `right' of the untouched point have the same coordinate, then
|
||||||
|
the inferred delta for the untouched point should be zero.
|
||||||
|
|
||||||
|
* src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new
|
||||||
|
behaviour.
|
||||||
|
|
||||||
2017-05-02 Werner Lemberg <wl@gnu.org>
|
2017-05-02 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[autofit] Remove `slight' auto-hint mode again.
|
[autofit] Remove `slight' auto-hint mode again.
|
||||||
|
|
|
@ -3081,25 +3081,12 @@
|
||||||
d1 = out1 - in1;
|
d1 = out1 - in1;
|
||||||
d2 = out2 - in2;
|
d2 = out2 - in2;
|
||||||
|
|
||||||
if ( out1 == out2 || in1 == in2 )
|
/* If the reference points have the same coordinate but different */
|
||||||
|
/* delta, inferred delta is zero. Otherwise interpolate. */
|
||||||
|
if ( in1 != in2 || out1 == out2 )
|
||||||
{
|
{
|
||||||
for ( p = p1; p <= p2; p++ )
|
FT_Fixed scale = in1 != in2 ? FT_DivFix( out2 - out1, in2 - in1 )
|
||||||
{
|
: 0;
|
||||||
out = in_points[p].x;
|
|
||||||
|
|
||||||
if ( out <= in1 )
|
|
||||||
out += d1;
|
|
||||||
else if ( out >= in2 )
|
|
||||||
out += d2;
|
|
||||||
else
|
|
||||||
out = out1;
|
|
||||||
|
|
||||||
out_points[p].x = out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FT_Fixed scale = FT_DivFix( out2 - out1, in2 - in1 );
|
|
||||||
|
|
||||||
|
|
||||||
for ( p = p1; p <= p2; p++ )
|
for ( p = p1; p <= p2; p++ )
|
||||||
|
|
Loading…
Reference in New Issue