Skip to content

Commit

Permalink
Register only the export formats that the backend supports
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Dec 20, 2024
1 parent b95da6f commit 4ac8113
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/fontra/views/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,16 +684,18 @@ export class EditorController extends ViewController {
}

initActionsAfterStart() {
if (this.fontController.backendInfo.projectManagerFeatures["export-as"]) {
for (const format of EXPORT_FORMATS) {
registerAction(
`action.export-as.${format}`,
{
topic: "0035-action-topics.export-as",
},
(event) => this.fontController.exportAs({ format })
);
}
for (const format of this.fontController.backendInfo.projectManagerFeatures[
"export-as"
] || []) {
registerAction(
`action.export-as.${format}`,
{
topic: "0035-action-topics.export-as",
},
(event) => this.fontController.exportAs({ format })
);
}

if (this.fontController.backendInfo.features["find-glyphs-that-use-glyph"]) {
registerAction(
"action.find-glyphs-that-use",
Expand Down

0 comments on commit 4ac8113

Please sign in to comment.