[var-common] Make VarInstancer take an offset
This commit is contained in:
parent
251f9f6213
commit
e06de98c36
|
@ -943,10 +943,10 @@ struct ClipBox
|
|||
if (u.format == 2 && instancer)
|
||||
{
|
||||
uint32_t varIdx = u.format2.varIdxBase;
|
||||
xmin += _hb_roundf (instancer (VarIdx::add (varIdx, 0)));
|
||||
ymin += _hb_roundf (instancer (VarIdx::add (varIdx, 1)));
|
||||
xmax += _hb_roundf (instancer (VarIdx::add (varIdx, 2)));
|
||||
ymax += _hb_roundf (instancer (VarIdx::add (varIdx, 3)));
|
||||
xmin += _hb_roundf (instancer (varIdx, 0));
|
||||
ymin += _hb_roundf (instancer (varIdx, 1));
|
||||
xmax += _hb_roundf (instancer (varIdx, 2));
|
||||
ymax += _hb_roundf (instancer (varIdx, 3));
|
||||
}
|
||||
extents->x_bearing = xmin;
|
||||
extents->y_bearing = ymax;
|
||||
|
|
|
@ -229,8 +229,8 @@ struct VarStoreInstancer
|
|||
|
||||
operator bool () const { return bool (coords); }
|
||||
|
||||
float operator() (uint32_t varIdx) const
|
||||
{ return varStore.get_delta (varIdxMap.map (varIdx), coords); }
|
||||
float operator() (uint32_t varIdx, unsigned short offset = 0) const
|
||||
{ return varStore.get_delta (varIdxMap.map (VarIdx::add (varIdx, offset)), coords); }
|
||||
|
||||
const VariationStore &varStore;
|
||||
const DeltaSetIndexMap &varIdxMap;
|
||||
|
|
Loading…
Reference in New Issue