ref: 029191349104a5bf9c0614facf0bbbeb248d5468
parent: fb90f00cbd0a55ad9278bc382394a8186840bfac
author: Werner Lemberg <[email protected]>
date: Sat Jan 7 02:45:28 EST 2017
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2017-01-06 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[truetype] More generalization of GX stuff.
We need this later on for MVAR also.
@@ -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 <[email protected]>
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -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 );