Browse Source

Font: Fix font replacement predicate

jawt-dll
weisj 3 years ago
parent
commit
1b0752e160
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 6
      core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java

6
core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java

@ -182,7 +182,11 @@ public class FontDefaultsInitTask implements DefaultsInitTask {
private void patchOSFonts(final UIDefaults defaults, final Function<Map.Entry<Object, Font>, Font> mapper) {
PropertyLoader.replacePropertyEntriesOfType(Font.class, defaults,
e -> Font.DIALOG.equals(e.getValue().getName()), mapper);
e -> isDefaultFont(e.getValue()), mapper);
}
private boolean isDefaultFont(final Font font) {
return Font.DIALOG.equals(font.getFamily());
}
private Font mapMacOSFont(final Map.Entry<Object, Font> entry) {

Loading…
Cancel
Save