parseFvarInstance function

dynamic parseFvarInstance(
  1. dynamic data,
  2. dynamic start,
  3. dynamic axes,
  4. dynamic names,
)

Implementation

parseFvarInstance(data, start, axes, names) {
    var inst = {};
    var p = new Parser(data, start);
    inst["name"] = names[p.parseUShort()] ?? {};
    p.skip('uShort', 1);  // reserved for flags; no values defined

    inst["coordinates"] = {};
    for (var i = 0; i < axes.length; ++i) {
        inst["coordinates"][axes[i].tag] = p.parseFixed();
    }

    return inst;
}