Skip to content

Commit

Permalink
Merge pull request #1357 from googlefonts/issue-1356-bugfix-status-co…
Browse files Browse the repository at this point in the history
…lor-new-glyph

Fix status color issue with newly created glyph or layer
  • Loading branch information
justvanrossum authored May 14, 2024
2 parents 2619273 + 46eeb47 commit d5af346
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/fontra/views/editor/visualization-layer-definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,12 +1045,16 @@ registerVisualizationLayerDefinition({
return;
}

const status =
let status =
positionedGlyph.varGlyph.sources[sourceIndex].customData[
"fontra.development.status"
];

if (status === undefined) {
return;
status = statusFieldDefinitions.find((statusDef) => statusDef.isDefault)?.value;
if (status === undefined) {
return;
}
}

const color = [...statusFieldDefinitions[status].color];
Expand Down

0 comments on commit d5af346

Please sign in to comment.