From 3d5fa4614a95a84d0a1075204294d6fa517eb34a Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage Date: Tue, 17 Sep 2019 23:48:16 +0200 Subject: [PATCH 1/2] Remove JavaFX-Font-Tweak --- src/main/java/org/jabref/JabRefGUI.java | 11 ----------- .../jabref/gui/preferences/AppearancePrefsTab.java | 10 +--------- .../org/jabref/preferences/JabRefPreferences.java | 2 -- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/main/java/org/jabref/JabRefGUI.java b/src/main/java/org/jabref/JabRefGUI.java index 66fe3694ffa..80e3281b970 100644 --- a/src/main/java/org/jabref/JabRefGUI.java +++ b/src/main/java/org/jabref/JabRefGUI.java @@ -62,8 +62,6 @@ public JabRefGUI(Stage mainStage, List argsDatabases, boolean isBl } private void openWindow(Stage mainStage) { - applyFontRenderingTweak(); - // If the option is enabled, open the last edited libraries, if any. if (!isBlank && Globals.prefs.getBoolean(JabRefPreferences.OPEN_LAST_EDITED)) { openLastEditedDatabases(); @@ -229,15 +227,6 @@ private boolean isLoaded(File fileToOpen) { return false; } - private void applyFontRenderingTweak() { - // On Linux, Java FX fonts look blurry per default. This can be improved by using a non-default rendering setting. - // See https://github.com/woky/javafx-hates-linux - if (Globals.prefs.getBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK)) { - System.setProperty("prism.text", "t2k"); - System.setProperty("prism.lcdtext", "true"); - } - } - public static JabRefFrame getMainFrame() { return mainFrame; } diff --git a/src/main/java/org/jabref/gui/preferences/AppearancePrefsTab.java b/src/main/java/org/jabref/gui/preferences/AppearancePrefsTab.java index 4f48c40b390..74f29edbe34 100644 --- a/src/main/java/org/jabref/gui/preferences/AppearancePrefsTab.java +++ b/src/main/java/org/jabref/gui/preferences/AppearancePrefsTab.java @@ -24,7 +24,6 @@ class AppearancePrefsTab extends Pane implements PreferencesTab { private final JabRefPreferences prefs; - private final CheckBox fontTweaksLAF; private final TextField fontSize; private final CheckBox overrideFonts; private final DialogService dialogService; @@ -46,7 +45,6 @@ public AppearancePrefsTab(DialogService dialogService, JabRefPreferences prefs) fontSize = new TextField(); fontSize.setTextFormatter(ControlHelper.getIntegerTextFormatter()); Label fontSizeLabel = new Label(Localization.lang("Font size:")); - fontTweaksLAF = new CheckBox(Localization.lang("Tweak font rendering for entry editor on Linux")); ToggleGroup themeGroup = new ToggleGroup(); lightTheme = new RadioButton("Light theme"); @@ -83,17 +81,12 @@ public Node getBuilder() { @Override public void setValues() { - fontTweaksLAF.setSelected(prefs.getBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK)); overrideFonts.setSelected(prefs.getBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONT_SIZE)); fontSize.setText(String.valueOf(prefs.getInt(JabRefPreferences.MAIN_FONT_SIZE))); } @Override public void storeSettings() { - // Java FX font rendering tweak - final boolean oldFxTweakValue = prefs.getBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK); - prefs.putBoolean(JabRefPreferences.FX_FONT_RENDERING_TWEAK, fontTweaksLAF.isSelected()); - final boolean oldOverrideDefaultFontSize = prefs.getBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONT_SIZE); final int oldFontSize = prefs.getInt(JabRefPreferences.MAIN_FONT_SIZE); prefs.putBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONT_SIZE, overrideFonts.isSelected()); @@ -111,8 +104,7 @@ public void storeSettings() { } boolean isRestartRequired = - (oldFxTweakValue != fontTweaksLAF.isSelected()) - || (oldOverrideDefaultFontSize != overrideFonts.isSelected()) + (oldOverrideDefaultFontSize != overrideFonts.isSelected()) || (oldFontSize != newFontSize) || isThemeChanged; if (isRestartRequired) { diff --git a/src/main/java/org/jabref/preferences/JabRefPreferences.java b/src/main/java/org/jabref/preferences/JabRefPreferences.java index e35ca7a1e61..5c9ccae5566 100644 --- a/src/main/java/org/jabref/preferences/JabRefPreferences.java +++ b/src/main/java/org/jabref/preferences/JabRefPreferences.java @@ -127,7 +127,6 @@ public class JabRefPreferences implements PreferencesService { public static final String LYXPIPE = "lyxpipe"; public static final String EXTERNAL_FILE_TYPES = "externalFileTypes"; public static final String FONT_FAMILY = "fontFamily"; - public static final String FX_FONT_RENDERING_TWEAK = "fxFontRenderingTweak"; public static final String FX_THEME = "fxTheme"; public static final String LANGUAGE = "language"; public static final String NAMES_LAST_ONLY = "namesLastOnly"; @@ -472,7 +471,6 @@ private JabRefPreferences() { defaults.put(EMACS_PATH, "emacsclient"); } - defaults.put(FX_FONT_RENDERING_TWEAK, OS.LINUX); //we turn this on per default on Linux defaults.put(EMACS_ADDITIONAL_PARAMETERS, "-n -e"); defaults.put(PUSH_TO_APPLICATION, "TeXstudio"); From 55a1685a4f0f98330378591e3ad46b908d83b3ca Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage Date: Wed, 18 Sep 2019 00:04:05 +0200 Subject: [PATCH 2/2] l10n --- src/main/resources/l10n/JabRef_en.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 283a0fd5ddc..cf3132a84da 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -954,7 +954,6 @@ Upgrade\ external\ PDF/PS\ links\ to\ use\ the\ '%0'\ field.=Upgrade external PD usage=usage Use\ autocompletion=Use autocompletion -Tweak\ font\ rendering\ for\ entry\ editor\ on\ Linux=Tweak font rendering for entry editor on Linux Use\ regular\ expression\ search=Use regular expression search Username=Username