mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 09:10:48 +00:00
loading list of fonts on demand - X11 load bug on Java9
This commit is contained in:
@@ -92,7 +92,7 @@ public class FontPanel extends JPanel {
|
||||
|
||||
public static ComboBoxModel<FontFamily> getFamilyModel() {
|
||||
Set<FontFamily> famSet = new TreeSet<>();
|
||||
for (Font f : FontTag.installedFontsByName.values()) {
|
||||
for (Font f : FontTag.getInstalledFontsByName().values()) {
|
||||
famSet.add(new FontFamily(f));
|
||||
}
|
||||
return new DefaultComboBoxModel<>(new Vector<>(famSet));
|
||||
@@ -101,7 +101,7 @@ public class FontPanel extends JPanel {
|
||||
public static ComboBoxModel<FontFace> getFaceModel(FontFamily family) {
|
||||
|
||||
Set<FontFace> faceSet = new TreeSet<>();
|
||||
for (Font f : FontTag.installedFontsByFamily.get(family.familyEn).values()) {
|
||||
for (Font f : FontTag.getInstalledFontsByFamily().get(family.familyEn).values()) {
|
||||
faceSet.add(new FontFace(f));
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ public class FontPanel extends JPanel {
|
||||
|
||||
fontFamilyNameSelection.setPreferredSize(new Dimension(100, fontFamilyNameSelection.getMinimumSize().height));
|
||||
fontFamilyNameSelection.setModel(getFamilyModel());
|
||||
fontFamilyNameSelection.setSelectedItem(FontTag.defaultFontName);
|
||||
fontFamilyNameSelection.setSelectedItem(FontTag.getDefaultFontName());
|
||||
fontFaceSelection.setModel(getFaceModel((FontFamily) fontFamilyNameSelection.getSelectedItem()));
|
||||
fontFamilyNameSelection.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user