18

I installed IntelliJ IDEA 13.1 and Oracle JDK 1.8 on Ubuntu 14.04 x64 but when I launch IntelliJ IDEA the font is not ideal.

How I can change the font?

screenshot

Fabby
  • 34,259
Silvestr
  • 281
  • The font rendering in the screen shot looks ok to me. Are you running the native resolution of your screen with the correct sub-pixel anti-aliasing settings? – David Foerster Oct 25 '14 at 08:54
  • Note that Intellij uses the default java which typically is openjdk (which for some reason has inferior font rendering), unless you set the JAVA_HOME line in bin/idea.sh – Thorbjørn Ravn Andersen Jul 14 '15 at 08:43

9 Answers9

27

I wrote a little manual how to fix this. Note: that it is only for 64-bit. architecture.

wget https://cloud.urshulyak.com/index.php/s/kcBfJQDyQABcbjz/download &&
mv download jdk-8u5-tuxjdk-b08.tar.gz &&
tar -zxvf jdk-8u5-tuxjdk-b08.tar.gz &&
sudo mv jdk-8u5-tuxjdk-b08 /usr/lib/jvm &&
rm jdk-8u5-tuxjdk-b08.tar.gz

Script to start Intellij Idea

*only note that need to change IDEA_HOME location for your path of idea

#!/bin/sh

IDEA_HOME=/opt/idea

for old idea JAVA_HOME, for new 2016+ will be IDEA_JDK

#export JAVA_HOME=/usr/lib/jvm/jdk-8u5-tuxjdk-b08/

export IDEA_JDK=/usr/lib/jvm/jdk-8u5-tuxjdk-b08/ export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.xrender=true" export GNOME_DESKTOP_SESSION_ID=this-is-deprecated exec $IDEA_HOME/bin/idea.sh "$@"

Result:

8

Short answer that worked for me:

1) Go to File->Settings->Appearance & Behavior->Appearance.

2) Under anti-aliasing change both IDE and Editor options to "Greyscale".

Pavel
  • 1
4

Don't apply this configuration on Ubuntu 14!

Install freetype

$ sudo apt-get install libfreetype6

Install infinality patch

$ sudo add-apt-repository ppa:no1wantdthisname/ppa
$ sudo apt-get update
$ sudo apt-get install fontconfig-infinality

I had to do the following afterwards:

$ sudo rm /etc/fonts/conf.avail/52-infinality.conf
$ sudo ln -s /etc/fonts/infinality/infinality.conf /etc/fonts/conf.avail/52-infinality.conf

To use Windows 7 like font rendering do the following:

$ sudo /etc/fonts/infinality/infctl.sh setstyle win7

Configure your IDEA_HOME/bin/idea64.vmoptions. Add below lines:

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

Also enable Use Anti-aliased font checkbox, go to: File -> Settings -> Editor -> Appearance.

Preview:

Editor font: Monaco, UI: Ubuntu Bold

enter image description here

Anton Dozortsev
  • 1,132
  • 10
  • 21
4

I have prepared a dedicated font named as "Ubuntu Mono Nohinting" to workaround a rendering issue with Java Swing applications such as NetBeans IDE, IntelliJ IDEA and PyCharm. The font hinting information has been stripped from the original Ubuntu Mono font family.

How to install

  • download the zip file from here
  • extract it
  • open *.ttf with Font Viewer to install.
  • or you can manually copy *.ttf into ~/.local/share/fonts/.

How to use

  • Select "Ubuntu Mono Nohinting" in editors' configuration.

Screenshots

Ubuntu Mono Font with PyCharm Monokai theme

Ubuntu Mono Font with PyCharm Monokai theme

Ubuntu Mono Nohinting Font with PyCharm Monokai theme

Ubuntu Mono Nohinting Font with PyCharm Monokai theme

2

Note that in Webstorm 9, the file you need to add these changes:

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

is:

bin/webstorm64.vmoptions

Confirmed working on Ubuntu 14.04

Tivoni
  • 136
  • 5
1

At startup before opening a project go to Configure -> Settings -> Appearance and tick override default font checkbox, select font and size (I highly recommend Dejavu Sans Mono 14px, everywhere)

Benoit
  • 7,567
  • 1
  • 25
  • 34
0

You can change the font used by IntelliJ. To do that:

  • Select the File menu, and choose Settings -> Editor -> Colors & Fonts -> Font.
  • Click on Save As in the right-hand pane and enter a name for your new Scheme
  • Change what is selected under Primary Font
  • Click Apply
jkt123
  • 3,530
  • 22
  • 24
0

As mentioned in an answer above, using jdk-8u5-tuxjdk-b08.tar.gz fixed the problem for me while using Ubuntu 16.10 and IntelliJ 2016.

One smarter way of configuring the above mentioned jdk as IDE boot JDK (once it is downloaded and extracted) is using Intellij's "Quick Action" Ctlr + Shift + A and search for Switch IDE Boot jdk. Browse the extracted jdk and restart IntelliJ !

0

You can download IntelliJ Idea with a custom embedded OpenJDK which includes font rendering fixes.

Bundled OpenJDK fixes a lot of font rendering issues that will be fixed only in Java 9.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/205418410/comments/204844430

Sometimes (as in the case of 171.3780.107) font rendering fixes didn't work and I had to copy the embedded jre of the previous version (simply copy the jre folder).