From 18c28bd8da7ab77324bd0e5e9754daf20c786cd5 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Thu, 21 Jul 2022 18:23:22 +0300 Subject: [PATCH] [config] Replace docbuilder options all-fonts-path and fonts-dir with check-fonts=0 --- Common/config/default.json | 2 -- Common/config/development-linux.json | 4 +--- Common/config/development-mac.json | 2 -- Common/config/development-windows.json | 2 -- Common/config/production-linux.json | 4 +--- Common/config/production-windows.json | 4 +--- FileConverter/sources/converter.js | 7 +------ 7 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Common/config/default.json b/Common/config/default.json index 32fe14f8..df6b04d5 100644 --- a/Common/config/default.json +++ b/Common/config/default.json @@ -287,8 +287,6 @@ "presentationThemesDir": "null", "x2tPath": "null", "docbuilderPath": "null", - "docbuilderAllFontsPath": "null", - "docbuilderCoreFontsPath": "", "args": "", "spawnOptions": {}, "errorfiles": "", diff --git a/Common/config/development-linux.json b/Common/config/development-linux.json index 26de849d..b9f2c44e 100644 --- a/Common/config/development-linux.json +++ b/Common/config/development-linux.json @@ -54,9 +54,7 @@ "fontDir": "/usr/share/fonts", "presentationThemesDir": "../../sdkjs/slide/themes", "x2tPath": "../FileConverter/bin/x2t", - "docbuilderPath": "../FileConverter/bin/docbuilder", - "docbuilderAllFontsPath": "../App_Data/docbuilder/AllFonts.js", - "docbuilderCoreFontsPath": "../../core-fonts" + "docbuilderPath": "../FileConverter/bin/docbuilder" } }, "SpellChecker": { diff --git a/Common/config/development-mac.json b/Common/config/development-mac.json index 30adaa9c..20533ca7 100644 --- a/Common/config/development-mac.json +++ b/Common/config/development-mac.json @@ -61,8 +61,6 @@ "presentationThemesDir": "../../sdkjs/slide/themes", "x2tPath": "../FileConverter/bin/x2t", "docbuilderPath": "../FileConverter/Bin/docbuilder", - "docbuilderAllFontsPath": "../App_Data/docbuilder/AllFonts.js", - "docbuilderCoreFontsPath": "../../core-fonts", "errorfiles": "error" } }, diff --git a/Common/config/development-windows.json b/Common/config/development-windows.json index 4c87b952..e0fa7068 100644 --- a/Common/config/development-windows.json +++ b/Common/config/development-windows.json @@ -61,8 +61,6 @@ "presentationThemesDir": "../../sdkjs/slide/themes", "x2tPath": "../FileConverter/Bin/x2t.exe", "docbuilderPath": "../FileConverter/Bin/docbuilder.exe", - "docbuilderAllFontsPath": "../App_Data/docbuilder/AllFonts.js", - "docbuilderCoreFontsPath": "../../core-fonts", "errorfiles": "error" } }, diff --git a/Common/config/production-linux.json b/Common/config/production-linux.json index de8c7c33..0cb4dc65 100644 --- a/Common/config/production-linux.json +++ b/Common/config/production-linux.json @@ -63,9 +63,7 @@ "fontDir": "/usr/share/fonts", "presentationThemesDir": "/var/www/onlyoffice/documentserver/sdkjs/slide/themes", "x2tPath": "/var/www/onlyoffice/documentserver/server/FileConverter/bin/x2t", - "docbuilderPath": "/var/www/onlyoffice/documentserver/server/FileConverter/bin/docbuilder", - "docbuilderAllFontsPath": "/var/lib/onlyoffice/documentserver/App_Data/docbuilder/AllFonts.js", - "docbuilderCoreFontsPath": "/var/www/onlyoffice/documentserver/core-fonts" + "docbuilderPath": "/var/www/onlyoffice/documentserver/server/FileConverter/bin/docbuilder" } }, "SpellChecker": { diff --git a/Common/config/production-windows.json b/Common/config/production-windows.json index 271459c5..648038ea 100644 --- a/Common/config/production-windows.json +++ b/Common/config/production-windows.json @@ -59,9 +59,7 @@ "fontDir": "", "presentationThemesDir": "../../sdkjs/slide/themes", "x2tPath": "../FileConverter/bin/x2t.exe", - "docbuilderPath": "../FileConverter/bin/docbuilder.exe", - "docbuilderAllFontsPath": "../App_Data/docbuilder/AllFonts.js", - "docbuilderCoreFontsPath": "../../core-fonts" + "docbuilderPath": "../FileConverter/bin/docbuilder.exe" } }, "SpellChecker": { diff --git a/FileConverter/sources/converter.js b/FileConverter/sources/converter.js index 5c8fab88..49b39852 100644 --- a/FileConverter/sources/converter.js +++ b/FileConverter/sources/converter.js @@ -62,8 +62,6 @@ var cfgFontDir = configConverter.get('fontDir'); var cfgPresentationThemesDir = configConverter.get('presentationThemesDir'); var cfgX2tPath = configConverter.get('x2tPath'); var cfgDocbuilderPath = configConverter.get('docbuilderPath'); -var cfgDocbuilderAllFontsPath = configConverter.get('docbuilderAllFontsPath'); -var cfgDocbuilderCoreFontsPath = configConverter.get('docbuilderCoreFontsPath'); var cfgArgs = configConverter.get('args'); var cfgSpawnOptions = configConverter.get('spawnOptions'); if (cfgSpawnOptions.env) { @@ -680,10 +678,7 @@ function* spawnProcess(isBuilder, tempDirs, dataConvert, authorProps, getTaskTim } else { fs.mkdirSync(path.join(tempDirs.result, 'output')); processPath = cfgDocbuilderPath; - childArgs.push('--all-fonts-path=' + cfgDocbuilderAllFontsPath); - if (cfgDocbuilderCoreFontsPath) { - childArgs.push('--fonts-dir=' + cfgDocbuilderCoreFontsPath); - } + childArgs.push('--check-fonts=0'); childArgs.push('--save-use-only-names=' + tempDirs.result + '/output'); childArgs.push(dataConvert.fileFrom); }