[truetype] Variation font API stability issues.
Make some functions work before a call to `TT_Set_MM_Blend'. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if we don't blend. (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we don't blend.
This commit is contained in:
parent
91fc3bd7c9
commit
7591bf11d1
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2016-12-29 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype] Variation font API stability issues.
|
||||
|
||||
Make some functions work before a call to `TT_Set_MM_Blend'.
|
||||
|
||||
* src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
|
||||
we don't blend.
|
||||
(TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
|
||||
don't blend.
|
||||
|
||||
2016-12-29 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
|
||||
|
@ -786,7 +786,7 @@
|
||||
FT_Fixed delta;
|
||||
|
||||
|
||||
if ( !face->blend )
|
||||
if ( !face->doblend || !face->blend )
|
||||
goto Exit;
|
||||
|
||||
if ( !face->blend->hvar_loaded )
|
||||
@ -1745,8 +1745,17 @@
|
||||
nc = blend->num_axis;
|
||||
}
|
||||
|
||||
for ( i = 0; i < nc; i++ )
|
||||
coords[i] = blend->normalizedcoords[i];
|
||||
if ( face->doblend )
|
||||
{
|
||||
for ( i = 0; i < nc; i++ )
|
||||
coords[i] = blend->normalizedcoords[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( i = 0; i < nc; i++ )
|
||||
coords[i] = 0;
|
||||
}
|
||||
|
||||
for ( ; i < num_coords; i++ )
|
||||
coords[i] = 0;
|
||||
|
||||
@ -1947,8 +1956,16 @@
|
||||
nc = blend->num_axis;
|
||||
}
|
||||
|
||||
for ( i = 0; i < nc; ++i )
|
||||
coords[i] = blend->normalizedcoords[i];
|
||||
if ( face->doblend )
|
||||
{
|
||||
for ( i = 0; i < nc; i++ )
|
||||
coords[i] = blend->normalizedcoords[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( i = 0; i < nc; i++ )
|
||||
coords[i] = 0;
|
||||
}
|
||||
|
||||
for ( ; i < num_coords; i++ )
|
||||
coords[i] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user