Stock font rendering in Pycharm / Intelliji IDEA is horrible on Ubuntu. To improve it, change the following:
First of all, we need to install Infinality fonts:
1 2 3 4 5 6 7 8 9 10 11 |
sudo add-apt-repository ppa:no1wantdthisname/ppa sudo apt-get update sudo apt-get upgrade sudo apt-get install fontconfig-infinality sudo /etc/fonts/infinality/infctl.sh setstyle linux sudo gedit /etc/profile.d/infinality-settings.sh # and set USE_STYLE="UBUNTU" |
Installed the patched OpenJDK with fontfix:
1 2 3 4 5 |
sudo apt-add-repository -y ppa:no1wantdthisname/openjdk-fontfix sudo apt-get update sudo apt-get install openjdk-7-jdk |
In $IDEA_HOME/bin/*.vmoptions add the following: (PS: $IDEA_HOME is the path to IntelliJIdea or Pycharm)
1 2 3 4 5 |
-Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -Dsun.java2d.xrender=true |
and in $IDEA_HOME/bin/pycharm.sh or idea.sh change the following line
1 2 3 |
eval "$JDK/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@" |
with
1 2 3 |
eval "/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@" |
Reboot.
Start the IDE and enjoy perfect fonts.