mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 08:10:45 +00:00
#1075 Lenght of DefineText is more larger than original when DefineText is saved: detect letter spacing
This commit is contained in:
@@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.gui;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.configuration.SwfSpecificConfiguration;
|
||||
import com.jpexs.decompiler.flash.gui.helpers.TableLayoutHelper;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.FontTag;
|
||||
@@ -214,28 +213,7 @@ public class FontPanel extends JPanel {
|
||||
fontCharactersScrollPane.getVerticalScrollBar().scrollRectToVisible(new Rectangle(0, 0, 1, 1));
|
||||
setAllowSave(false);
|
||||
|
||||
String selectedFont;
|
||||
|
||||
if (swf.sourceFontNamesMap.containsKey(ft.getFontId())) {
|
||||
selectedFont = swf.sourceFontNamesMap.get(ft.getFontId());
|
||||
} else {
|
||||
SwfSpecificConfiguration swfConf = Configuration.getSwfSpecificConfiguration(swf.getShortFileName());
|
||||
String key = ft.getFontId() + "_" + ft.getFontNameIntag();
|
||||
if (swfConf != null && swfConf.fontPairingMap.containsKey(key)) {
|
||||
selectedFont = swfConf.fontPairingMap.get(key);
|
||||
} else if (Configuration.getFontToNameMap().containsKey(ft.getFontNameIntag())) {
|
||||
selectedFont = Configuration.getFontToNameMap().get(ft.getFontNameIntag());
|
||||
} else {
|
||||
selectedFont = FontTag.findInstalledFontName(ft.getFontName());
|
||||
}
|
||||
}
|
||||
|
||||
Font selFont = FontTag.installedFontsByName.get(selectedFont);
|
||||
if (selFont == null) {
|
||||
selectedFont = FontTag.findInstalledFontName(ft.getFontName());
|
||||
selFont = FontTag.installedFontsByName.get(selectedFont);
|
||||
}
|
||||
|
||||
Font selFont = ft.getSystemFont();
|
||||
fontFamilyNameSelection.setSelectedItem(new FontFamily(selFont));
|
||||
fontFaceSelection.setSelectedItem(new FontFace(selFont));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user