From 227c8aad457593ff28300e46dffe1c251364d6a7 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Tue, 7 Apr 2015 08:46:19 +0200 Subject: [PATCH] setting for including the version number in the exported fonts for debugging (to generate exactly the same binary TTF files) --- .../decompiler/flash/configuration/Configuration.java | 4 ++++ .../jpexs/decompiler/flash/exporters/FontExporter.java | 8 +++++++- src/com/jpexs/decompiler/flash/gui/ExportDialog.java | 3 ++- .../flash/gui/locales/AdvancedSettingsDialog.properties | 3 +++ .../gui/locales/AdvancedSettingsDialog_hu.properties | 3 +++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index d202a8e30..6f7ddf493 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -198,6 +198,10 @@ public class Configuration { @ConfigurationCategory("debug") public static final ConfigurationItem dumpTags = null; + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("debug") + public static final ConfigurationItem setFFDecVersionInExportedFont = null; + @ConfigurationDefaultInt(60) @ConfigurationCategory("limit") public static final ConfigurationItem decompilationTimeoutSingleMethod = null; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java index 6297a076b..ce474b167 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FontExporter.java @@ -26,6 +26,7 @@ import com.jpexs.decompiler.flash.EventListener; import com.jpexs.decompiler.flash.RetryTask; import com.jpexs.decompiler.flash.RunnableIOEx; import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.FontExportMode; import com.jpexs.decompiler.flash.exporters.settings.FontExportSettings; import com.jpexs.decompiler.flash.exporters.shape.PathExporter; @@ -143,7 +144,12 @@ public class FontExporter { String cop = t.getCopyright(); f.getEngine().setCopyrightYear(cop == null ? "" : cop); - f.setAuthor(ApplicationInfo.shortApplicationVerName); + if (Configuration.setFFDecVersionInExportedFont.get()){ + f.setAuthor(ApplicationInfo.shortApplicationVerName); + } else { + f.setAuthor(ApplicationInfo.SHORT_APPLICATION_NAME); + } + f.setVersion("1.0"); SWF swf = t.getSwf(); diff --git a/src/com/jpexs/decompiler/flash/gui/ExportDialog.java b/src/com/jpexs/decompiler/flash/gui/ExportDialog.java index 994b1cb39..931c636d0 100644 --- a/src/com/jpexs/decompiler/flash/gui/ExportDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/ExportDialog.java @@ -154,6 +154,7 @@ public class ExportDialog extends AppDialog { public ExportDialog(List exportables) { setTitle(translate("dialog.title")); + setResizable(false); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { @@ -167,7 +168,7 @@ public class ExportDialog extends AppDialog { combos = new JComboBox[optionNames.length]; int labWidth = 0; for (int i = 0; i < optionNames.length; i++) { - JLabel label = new JLabel(optionNames[i]); + JLabel label = new JLabel(translate(optionNames[i])); if (label.getPreferredSize().width > labWidth) { labWidth = label.getPreferredSize().width; } diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index aee2d4318..e91a9c7a7 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -335,3 +335,6 @@ config.description.allowOnlyOneInstance = FFDec can be then run only once, all f config.name.scriptExportSingleFile = Export scripts to single file config.description.scriptExportSingleFile = Exporting texts to one file instead of multiple + +config.name.setFFDecVersionInExportedFont = Set FFDec version number in exported font +config.description.setFFDecVersionInExportedFont = When this setting is disabled, FFDec won't add the current FFDec version number to the exported font. diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_hu.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_hu.properties index df51cfaa1..314486317 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_hu.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_hu.properties @@ -332,3 +332,6 @@ config.description.allowOnlyOneInstance = FFDec csak egy p\u00e9ld\u00e1nyban fu config.name.scriptExportSingleFile = Szkriptek export\u00e1l\u00e1sa egy f\u00e1jlba config.description.scriptExportSingleFile = Szkriptek export\u00e1l\u00e1sa egyetlen f\u00e1jlba t\u00f6bb f\u00e1jl helyett + +config.name.setFFDecVersionInExportedFont = FFDec verzi\u00f3sz\u00e1m be\u00e1ll\u00edt\u00e1sa az export\u00e1lt bet\u0171t\u00edpusban +config.description.setFFDecVersionInExportedFont = Ha ez a be\u00e1ll\u00edt\u00e1s ki van kapcsolva, az FFDec nem fogja be\u00edrni az aktu\u00e1lis FFDec verzi\u00f3sz\u00e1m\u00e1t az export\u00e1lt bet\u0171t\u00edpus f\u00e1jlba.