[avar] Remove some unused code

Unfortunately subsetter doesn't support avar2 yet. So, more
cruft still left in there.
This commit is contained in:
Behdad Esfahbod committed 2025-03-02 17:00:17 -07:00
1 parent 29991730c6
commit bfcbb439cb
1 file changed
+6 -12
+6 -12
View File
@@ -208,6 +208,7 @@ struct SegmentMaps : Array16Of<AxisValueMap>
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<AxisValueMap>
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<SegmentMaps> (*map);
}
}
bool is_biased () const
{
// Whether this table can map a 0 to a non-0 value.