Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix font rendering in PHPStorm 10 in Linux?

Default font rendering always was rather ugly in Java apps in Linux. But there was good solution - OpenJDK font fix (openjdk-fontfix PPA in launchpad).

It worked great in PhPStorm 9 and previous versions, but it has stopped working in 10 version. Java options in config are identical.

Is there any way to fix font rendering?

Rendering before: rendering before

Rendering after: rendering after

like image 340
Higgs Bison Avatar asked Nov 19 '15 14:11

Higgs Bison


4 Answers

Solution to fix this problem is simple: just rename jre folder in PHPStorm installation directory. Since 10 version app is bundled with its own JRE, so it doesn`t use system JRE by default.

like image 87
Higgs Bison Avatar answered Oct 16 '22 22:10

Higgs Bison


Remove the bundled JRE

Add to bin/phpstorm64.vmoptions this two lines:

-Dswing.aatext=true
-Dawt.useSystemAAFontSettings=on

And in

Settings->Appearance & Behavior -> Apperance

Antialiasing:

IDE:Greyscale, Editor:Greyscale
like image 30
mxsteini Avatar answered Nov 05 '22 03:11

mxsteini


Solution to fix this problem is simple: just rename jre folder in PHPStorm installation directory. Since 10 version app is bundled with its own JRE, so it doesn`t use system JRE by default.

like image 7
Higgs Bison Avatar answered Nov 05 '22 01:11

Higgs Bison


At least on Arch Linux, when using OpenJDK, font rendering looks perfectly smooth. To force PHPStorm to use the system's OpenJDK instead of the bundled Oracle JDK, you have to set the environment variable WEBIDE_JDK to your OpenJDK path.

To do this in an update-safe manner, copy the .desktop file to your home dir:

$ cp /usr/share/applications/jetbrains-phpstorm.desktop ~/.local/share/applications/

And then change the content to:

[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/opt/phpstorm/bin/webide.png
Exec=env WEBIDE_JDK=/usr/lib/jvm/java-8-openjdk "/opt/phpstorm/bin/phpstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-phpstorm
like image 1
aeno Avatar answered Nov 05 '22 01:11

aeno