From 4ac8113261d086ae9a2bfab7b6beb814eaba1f40 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Fri, 20 Dec 2024 14:57:42 +0000 Subject: [PATCH] Register only the export formats that the backend supports --- src/fontra/views/editor/editor.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/fontra/views/editor/editor.js b/src/fontra/views/editor/editor.js index 0bf5b8fa6..53e464908 100644 --- a/src/fontra/views/editor/editor.js +++ b/src/fontra/views/editor/editor.js @@ -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",