[truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`.

System Internals / FreeType - Dominik Röttsches [chromium.org] - 19 May 2022 05:14 UTC

This will be needed for 'COLR' v1 variation support.

- src/truetype/ttgxvar.h (GX_ItemVarData, GX_AxisCoords, GX_VarRegion, GX_VarItemStore, GX_DeltaSetIdxMap): Move structures to...
- include/freetype/internal/ftmmtypes.h: ... this new file.

- include/freetype/internal/service/svmm.h (MultiMasters): Include `ftmmtypes.h`. (FT_Var_Load_Delta_Set_Idx_Map_Func, FT_Var_Load_Item_Var_Store_Func, FT_Var_Get_Item_Delta_Func, FT_Var_Done_Item_Var_Store_Func, FT_Var_Done_Delta_Set_Idx_Map_Func): New function typedefs. (MultiMasters): Add them. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.

- src/cff/cffdrivr.c (cff_load_item_variation_store, cff_load_delta_set_index_mapping, cff_get_item_delta, cff_done_item_variation_store, cff_done_delta_set_index_map): New wrapper methods calling into mm service. (cff_service_multi_masters): Updated.

- src/truetype/ttgxvar.c (ft_var_load_item_variation_store, ft_var_load_delta_set_index_mapping, ft_var_get_item_delta, ft_var_done_item_variation_store, ft_var_done_delta_set_index_map): Renamed to ... (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, tt_var_get_item_delta, tt_var_done_item_variation_store, tt_var_done_delta_set_index_map): ... this for consistency. Mark them as non-static.
- src/truetype/ttgxvar.h: Add corresponding prototypes.

- src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.

- src/type1/t1driver.c (t1_service_multi_masters): Updated.

a4c4566b6 [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`.
include/freetype/internal/ftmmtypes.h | 83 ++++++++++++++++++++
include/freetype/internal/services/svmm.h | 122 ++++++++++++++++++++----------
src/cff/cffdrivr.c | 109 ++++++++++++++++++++++----
src/truetype/ttdriver.c | 41 ++++++----
src/truetype/ttgxvar.c | 50 ++++++------
src/truetype/ttgxvar.h | 79 +++++++------------
src/type1/t1driver.c | 37 +++++----
7 files changed, 365 insertions(+), 156 deletions(-)

Upstream: git.savannah.gnu.org


  • Share