Reputation: 249
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?
Upvotes: 5
Views: 4367
Reputation: 25
I used Netbeans then phpstorm on linux mint. Bad fonts appear in editor when using Oracle JDK , I removed Oracle JDK and netbeans fonts and menu problem mouse over fixed.
Recently I got phpstorm as prequests install Oracle JDK every thing work fine except fonts, I made deep search and test many soultion.
finally I just install OpenJDK latested one by:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
for more about intalling openJDK
and in phpstorm there is option to select java on booting up : check link to see: https://www.jetbrains.com/help/phpstorm/switching-boot-jdk.html just choose OpenJDK from list and restart phpstorm every thing will be work fine.
Upvotes: 0
Reputation: 889
Some times all of this doesn't work, if you use some distros. In ubuntu's don't work font in sql panels and some popup's in editor.
In fedora's after install pathed jdk you can't see all fonts in editors. For get good font rendering you should use patched jdf and distros with Infinality ( ROSA, Arch, RFRemix and etc.) or install it in your system.
Install it in your system and add new java in you enviropment:
sudo mv ~/Download/jdk-8u25-tuxjdk-b01/ /opt/jdk-8u25-tuxjdk-b01/
cd /opt/jdk-8u25-tuxjdk-b01/
#update-alternatives - for deb system's, for rpm use alternatives
sudo update-alternatives --install /usr/bin/java java /opt/jdk-8u25-tuxjdk-b01/bin/java 2
sudo update-alternatives --config java
export JAVA_HOME=/opt/jdk-8u25-tuxjdk-b01
export JRE_HOME=/opt/jdk-8u25-tuxjdk-b01
export PATH=$PATH:/opt/jdk-8u25-tuxjdk-b01/bin:/opt/jdk-8u25-tuxjdk-b01/jre/bin
Install Infinality. Some article don't do it and get good font rendering. But if you start coding in JetBrains products you can see that in some editor in popup's and some special panel haven't any antialiasing and looks so awful.
sudo add-apt-repository ppa:no1wantdthisname/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fontconfig-infinality
After all you should setup infinality rendering style. Best render i get with ubuntu style. This option you can't get with setstyle command, that's why you should edit settings file. And in this file, search for USE_STYLE (it should be USE_STYLE="DEFAULT" by default) and change it to "UBUNTU".
sudo -H gedit /etc/profile.d/infinality-settings.sh
After installing you should log out. If after all you see not good antyalyzing - configurete infinity for you system.
This solution tested on Ubuntu, Xubuntu, Kubuntu, Linux Mint KDE, Fedora 21-23, RFRemix 20-23 ( have infinality in default), ROSA Fresh KDE ( have infinality in default need only patched jdk). If it's don't work for you check folders path for java and setting infinality for you system.
Upvotes: 0
Reputation: 560
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
Upvotes: 1
Reputation: 89
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
Upvotes: 4
Reputation: 249
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.
Upvotes: 7