mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-2000 RM 2019.3.1 font rendering regression, normal text is heavier
Added -Djava2d.font.loadFontConfig=bundled to force loading bundled font.conf
(cherry picked from commit 788e078f64)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
d2aeba8305
commit
bb97af7063
@@ -53,16 +53,21 @@ class FreetypeFontScaler extends FontScaler {
|
||||
@SuppressWarnings("removal")
|
||||
String fontConfName = java.security.AccessController.doPrivileged(
|
||||
(PrivilegedAction<String>) () -> {
|
||||
if ("true".equals(System.getProperty(
|
||||
"java2d.font.loadFontConf", ""))) {
|
||||
String loadFontConfig = System.getProperty(
|
||||
"java2d.font.loadFontConf", "");
|
||||
if ("true".equals(loadFontConfig)) {
|
||||
File f = new File(System.getProperty("user.home", "") +
|
||||
File.separator + ".fonts.conf");
|
||||
File.separator + ".fonts.conf");
|
||||
|
||||
if (!f.exists()) {
|
||||
f = new File(System.getProperty("java.home", "") +
|
||||
File.separator + "lib" + File.separator +
|
||||
"fonts" + File.separator + "font.conf");
|
||||
if (f.exists()) {
|
||||
return f.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
|
||||
if ("true".equals(loadFontConfig) || "bundled".equals(loadFontConfig)) {
|
||||
File f = new File(System.getProperty("java.home", "") +
|
||||
File.separator + "lib" + File.separator + "fonts" + File.separator + "font.conf");
|
||||
|
||||
return f.getAbsolutePath();
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user