Skip to content

Commit

Permalink
<dimension> now uses "name" attribute, not "tag"
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorp committed Apr 30, 2024
1 parent 4e17ad2 commit fbfa5b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/fencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ function mappingSimpleNormalize(axes, mapping) {

window.onkeydown = function (e) {

console.log(GLOBAL.font.fvar.axes);

let delta = 0;
switch (e.key) {
case "ArrowUp":
Expand Down Expand Up @@ -1006,7 +1004,7 @@ function updateMappingsXML() {
mapping[i].forEach((x, a) => {
const axis = GLOBAL.font.fvar.axes[a];
if (x !== undefined && axis.defaultValue !== x)
str += ` <dimension tag="${GLOBAL.font.fvar.axes[a].axisTag}" xvalue="${x}"/>\n`;
str += ` <dimension name="${GLOBAL.font.fvar.axes[a].name}" xvalue="${x}"/>\n`;
});
str += ` </${io}>\n`;
});
Expand Down
4 changes: 3 additions & 1 deletion src/samsa-core/samsa-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,9 @@ const TABLE_DECODERS = {
fvar.axes = [];
buf.seek(fvar.axesArrayOffset);
for (let a=0; a<fvar.axisCount; a++) {
fvar.axes.push(buf.decode(FORMATS.VariationAxisRecord));
const axis = buf.decode(FORMATS.VariationAxisRecord);
axis.name = font.names[axis.axisNameID];
fvar.axes.push(axis);
}
fvar.instances = [];
const includePostScriptNameID = fvar.instanceSize == fvar.axisCount * 4 + 6; // instanceSize determins whether postScriptNameID is included
Expand Down

0 comments on commit fbfa5b3

Please sign in to comment.