mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 01:23:56 +01:00
[var-common] Make VarInstancer take an offset
This commit is contained in:
1 parent
251f9f6213
commit
e06de98c36
2 files changed
+6
-6
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user