From bfcbb439cbbbc1e9b8faec39294fed97e52f6e38 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 8 Feb 2025 20:31:45 +0000 Subject: [PATCH] [avar] Remove some unused code Unfortunately subsetter doesn't support avar2 yet. So, more cruft still left in there. --- src/hb-ot-var-avar-table.hh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/hb-ot-var-avar-table.hh b/src/hb-ot-var-avar-table.hh index 1403565ce..e27ce0046 100644 --- a/src/hb-ot-var-avar-table.hh +++ b/src/hb-ot-var-avar-table.hh @@ -208,6 +208,7 @@ struct SegmentMaps : Array16Of int unmap (int value) const { return map (value, 1, 0); } + // TODO Kill this. Triple unmap_axis_range (const Triple& axis_range) const { F2DOT14 val, unmapped_val; @@ -230,6 +231,11 @@ struct SegmentMaps : Array16Of bool subset (hb_subset_context_t *c, hb_tag_t axis_tag) const { TRACE_SUBSET (this); + + /* This function cannot work on avar2 table (and currently doesn't). + * We should instead keep the design coords in the shape plan and use + * those. unmap_axis_range needs to be killed. */ + /* avar mapped normalized axis range*/ Triple *axis_range; if (!c->plan->axes_location.has (axis_tag, &axis_range)) @@ -374,18 +380,6 @@ struct avar #endif } - void unmap_coords (int *coords, unsigned int coords_length) const - { - unsigned int count = hb_min (coords_length, axisCount); - - const SegmentMaps *map = &firstAxisSegmentMaps; - for (unsigned int i = 0; i < count; i++) - { - coords[i] = map->unmap (coords[i]); - map = &StructAfter (*map); - } - } - bool is_biased () const { // Whether this table can map a 0 to a non-0 value.