Skip to content

Commit

Permalink
minor style and efficiency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorp committed Aug 3, 2024
1 parent 929457d commit a89a6d1
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/fencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ function loadFontFromArrayBuffer (arrayBuffer, options={}) {
}
else {
locationsTxt.add(locationTxt); // prevent this location from being added again using a serialized version of the array as a hash
const location = [[...corner], [...corner]];
const location = [corner, [...corner]];
const deltasI16 = SamsaFont.prototype.itemVariationStoreInstantiate(ivs, location[0])[ivdIndex];
deltasI16.forEach((delta, d) => {
const axisId = activeAxisIds[d];
Expand All @@ -767,22 +767,13 @@ function loadFontFromArrayBuffer (arrayBuffer, options={}) {
});
});

// now denormalize these locations
locations.forEach(location => {
const mapping = [
denormalizeTuple(location[0]),
denormalizeTuple(location[1]),
];
GLOBAL.mappings.push(mapping);
});
// now denormalize these locations and push them to the empty mappings array
locations.forEach(location => GLOBAL.mappings.push( [ denormalizeTuple(location[0]), denormalizeTuple(location[1]) ] ) );
console.log(GLOBAL.mappings);
}

}

// finalize and kick things off

// draw mappings SVG
// finalize and kick things off in the UI
mappingsSelectorPopulate();
updateMappingsXML();
mappingsChanged(0);
Expand Down

0 comments on commit a89a6d1

Please sign in to comment.