[truetype] More GX code shuffling.

We need this later on for MVAR also.

* src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item
variation store into...
(ft_var_done_item_variation_store): ...new function.
This commit is contained in:
Werner Lemberg 2017-01-07 07:45:28 +01:00
parent fb90f00cbd
commit 0291913491
2 changed files with 44 additions and 19 deletions

View File

@ -1,3 +1,13 @@
2017-01-06 Werner Lemberg <wl@gnu.org>
[truetype] More GX code shuffling.
We need this later on for MVAR also.
* src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item
variation store into...
(ft_var_done_item_variation_store): ...new function.
2017-01-06 Werner Lemberg <wl@gnu.org>
[truetype] More generalization of GX stuff.
@ -36,10 +46,10 @@
[truetype] Code shuffling.
* src/truetype/ttgxvar.c (): Split off loading of item variation
store and delta set index mapping into...
* src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of
item variation store and delta set index mapping into...
(ft_var_load_item_variation_store,
ft_var_load_delta_set_index_mapping): ... new functions.
ft_var_load_delta_set_index_mapping): ...new functions.
2017-01-06 Werner Lemberg <wl@gnu.org>

View File

@ -2990,6 +2990,35 @@
}
static void
ft_var_done_item_variation_store( TT_Face face,
GX_ItemVarStore itemStore )
{
FT_Memory memory = FT_FACE_MEMORY( face );
FT_UInt i;
if ( itemStore->varData )
{
for ( i = 0; i < itemStore->dataCount; i++ )
{
FT_FREE( itemStore->varData[i].regionIndices );
FT_FREE( itemStore->varData[i].deltaSet );
}
FT_FREE( itemStore->varData );
}
if ( itemStore->varRegionList )
{
for ( i = 0; i < itemStore->regionCount; i++ )
FT_FREE( itemStore->varRegionList[i].axisList );
FT_FREE( itemStore->varRegionList );
}
}
/*************************************************************************/
/* */
/* <Function> */
@ -3025,22 +3054,8 @@
if ( blend->hvar_table )
{
if ( blend->hvar_table->itemStore.varData )
{
for ( i = 0; i < blend->hvar_table->itemStore.dataCount; i++ )
{
FT_FREE( blend->hvar_table->itemStore.varData[i].regionIndices );
FT_FREE( blend->hvar_table->itemStore.varData[i].deltaSet );
}
FT_FREE( blend->hvar_table->itemStore.varData );
}
if ( blend->hvar_table->itemStore.varRegionList )
{
for ( i = 0; i < blend->hvar_table->itemStore.regionCount; i++ )
FT_FREE( blend->hvar_table->itemStore.varRegionList[i].axisList );
FT_FREE( blend->hvar_table->itemStore.varRegionList );
}
ft_var_done_item_variation_store( face,
&blend->hvar_table->itemStore );
FT_FREE( blend->hvar_table->widthMap.innerIndex );
FT_FREE( blend->hvar_table->widthMap.outerIndex );