mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-03 08:24:22 +00:00
import ascent, descent leading
This commit is contained in:
@@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.tags.base.FontTag;
|
||||
import com.jpexs.decompiler.flash.tags.font.CharacterRanges;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
@@ -80,6 +81,8 @@ public class FontEmbedDialog extends AppDialog {
|
||||
|
||||
private final JCheckBox allCheckbox;
|
||||
|
||||
private final JCheckBox importAscentDescentLeadingCheckBox;
|
||||
|
||||
public Font getSelectedFont() {
|
||||
if (ttfFileRadio.isSelected() && customFont != null) {
|
||||
return customFont;
|
||||
@@ -87,6 +90,10 @@ public class FontEmbedDialog extends AppDialog {
|
||||
return ((FontFace) faceSelection.getSelectedItem()).font;
|
||||
}
|
||||
|
||||
public boolean isImportAscentDescentLeading() {
|
||||
return importAscentDescentLeadingCheckBox.isSelected();
|
||||
}
|
||||
|
||||
public Set<Integer> getSelectedChars() {
|
||||
Set<Integer> chars = new TreeSet<>();
|
||||
Font f = getSelectedFont();
|
||||
@@ -128,7 +135,7 @@ public class FontEmbedDialog extends AppDialog {
|
||||
faceSelection.setModel(FontPanel.getFaceModel((FontFamily) familyNamesSelection.getSelectedItem()));
|
||||
}
|
||||
|
||||
public FontEmbedDialog(FontFace selectedFace, String selectedChars) {
|
||||
public FontEmbedDialog(boolean hasLayout, FontFace selectedFace, String selectedChars) {
|
||||
setSize(900, 600);
|
||||
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||
setTitle(translate("dialog.title"));
|
||||
@@ -248,6 +255,12 @@ public class FontEmbedDialog extends AppDialog {
|
||||
cnt.add(specialPanel);
|
||||
cnt.add(individialSample);
|
||||
|
||||
importAscentDescentLeadingCheckBox = new JCheckBox(translate("ascentdescentleading"));
|
||||
importAscentDescentLeadingCheckBox.setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
if (hasLayout) {
|
||||
cnt.add(importAscentDescentLeadingCheckBox);
|
||||
}
|
||||
|
||||
JPanel buttonsPanel = new JPanel(new FlowLayout());
|
||||
JButton okButton = new JButton(AppStrings.translate("button.ok"));
|
||||
okButton.addActionListener(this::okButtonActionPerformed);
|
||||
|
||||
Reference in New Issue
Block a user