From 90426b2b22f1e4bd262b65c9e9fca5e4b2deb25d Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Thu, 15 Apr 2021 14:32:09 +0800 Subject: [PATCH] Change TranslationEditor to handle fonts spec --- Translations/TranslationEditor.html | 31 ++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/Translations/TranslationEditor.html b/Translations/TranslationEditor.html index 6f0ee320..91b982b7 100644 --- a/Translations/TranslationEditor.html +++ b/Translations/TranslationEditor.html @@ -48,8 +48,8 @@ } else if (id == "current-lang-file") { if (checkTranslationFile(file.name)) { app.current = json; - if (!app.current.cyrillicGlyphs){ - app.current.cyrillicGlyphs = false; + if (!app.current.fonts){ + app.current.fonts = ["ascii_basic"]; } app.meta.currentLoaded = true; } @@ -137,6 +137,7 @@ loaded: false, }, obsolete : {}, + fontToAdd: "latin_extended", }, methods : { validateInput: function(valMap, id, mode) { @@ -246,7 +247,15 @@ } else { valMap[id] = message; } - } + }, + + removeFont: function(i) { + this.current.fonts.splice(i, 1); + }, + + addFont: function() { + this.current.fonts.push(this.fontToAdd); + }, } }); app.def = def; @@ -289,12 +298,20 @@ - Font table to use + Font tables to use
("ascii_basic" must be first) - + + + + +