Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the font in the new IntelliJ IDEA 14.1 not rendering properly?

I've just upgraded IntelliJ IDEA (ultimate) to Version 14.1 and the font used in the Project View, Menus and Dialogs seems not to be rendering correctly. I exported the same settings from my 14.0.3 version just in case, although they seem identical, but it still remained the same. I didn't do any changes to the JDK or anything, and if I run the old version the font changes back to the nice and crisp one. I am using Ubuntu 14.04. This problem does not happen on Windows 7.

Under IntelliJ IDEA 14.0.3:

IntelliJ IDEA 14.0.3

Under IntelliJ IDEA 14.1:

enter image description here

In the new one the font seems to be a bit larger (even though in both cases I they are set to Font Size 22, and I imported the settings from the previous IntelliJ IDEA installation). Notice how for example the 'g' is cut off underneath. There are also other problems where the text is misaligned on the buttons, or not fully visible in dialog boxes.

Usually this doesn't happen when I upgrade. Is there some way to make the font look like before? Did something changed in this latest version and I need to do some JVM switch in the startup script or something?

Update: 5/11/2015

Just updated to IntelliJ 15, and the problem is still there. Attached new screenshot. Notice how the text is cut out at the bottom where there are letters like p and y, and the button text is offset.

IntelliJ 15

like image 355
jbx Avatar asked Mar 26 '15 20:03

jbx


People also ask

How do I change the font in IntelliJ?

If you need to quickly change the font size while in the editor, press Ctrl+Alt+S to open the IDE settings, go to Editor | General, and select Change font size with Command+Mouse Wheel or Change font size with Control+Mouse depending on your operating system.

Which font is used in IntelliJ idea?

JetBrains Mono font is used by default for the Editor.

What is the default font size in IntelliJ?

Reset Editor Font Size Preference (default value is 12, can be changed in Settings > Tools > Quickly Change Editor Font Size Preference)

How do I fix IntelliJ issues?

Apply fixes in the Problems tool window All detected problems are listed in the left part of the tool window. Click a problem to display inspection details on the right. icon on the toolbar or in the context menu. You can also press Alt+Enter and select a suitable fix from the popup menu.


2 Answers

Seconding an earlier response to this question, I have also have had great luck fixing font rendering issues on IntelliJ using tuxjdk. Tuxjdk is a JDK for the IDE, while any applications you're coding on runs in their own project configured JDK such as Oracle or OpenJDK. Here are the instructions:

The following fetches, unpacks, and moves the version you need to /usr/lib, then cleans up the archive. Modify /usr/lib to wherever you like to keep your JDKs.

wget http://urshulyak.com:85/jdk-8u5-tuxjdk-b08.tar.gz
tar -zxvf jdk-8u5-tuxjdk-b08.tar.gz
sudo mv jdk-8u5-tuxjdk-b08 /usr/lib
rm jdk-8u5-tuxjdk-b08.tar.gz

Open up idea.sh in your IntelliJ application folder /idea-IU-141.*/bin. Change the following line at the bottom of the script from

LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" \

to

LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "/usr/lib/jdk-8u5-tuxjdk-b08/bin/java" \

That's it. This made huge font improvements for me in Ubuntu 14.04.

UPDATE (by OP)

This solution is the best so far (until JetBrains decide to fix it properly).

I would just add the line: IDEA_JDK="/usr/lib/jdk-8u25-tuxjdk/" to the top of idea.sh, which the script checks before resorting to JDK_HOME etc. (so is probably the recommended way) rather than messing with the LD_LIBRARY_PATH.

In my case I got nicely rendered but huge fonts with this solution. In order to fix it I had to do an extra fix from Appearance & Behaviour -> Appearance I chose the 'not recommended' option to Override default fonts by Arial size 12. This was the best effect I got so far.

like image 105
sxerri Avatar answered Sep 18 '22 08:09

sxerri


I am using OSX. It may not help.

Double tap shift and search for 'Switch IDE boot JDK'. Try different JDKs if there are.

like image 20
amdyes Avatar answered Sep 18 '22 08:09

amdyes