Skip to content

Commit cdb7252

Browse files
committed
select the processing.mono font by default
1 parent 806624b commit cdb7252

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/processing/app/ui/PreferencesFrame.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,12 +763,13 @@ void initFontList() {
763763
EventQueue.invokeLater(() -> {
764764
fontSelectionBox.setModel(new DefaultComboBoxModel<>(monoFontFamilies));
765765
String family = Preferences.get("editor.font.family");
766+
String defaultName = Toolkit.getMonoFontName();
766767
if ("processing.mono".equals(family)) {
767-
family = Toolkit.getMonoFontName();
768+
family = defaultName;
768769
}
769770

770771
// Set a reasonable default, in case selecting the family fails
771-
fontSelectionBox.setSelectedItem("Monospaced");
772+
fontSelectionBox.setSelectedItem(defaultName);
772773
// Now try to select the family (will fail silently, see prev line)
773774
fontSelectionBox.setSelectedItem(family);
774775
fontSelectionBox.setEnabled(true);

0 commit comments

Comments
 (0)