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

4

10

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

Merce answered 26/3, 2015 at 20:1 Comment(8)
Try this: https://mcmap.net/q/1167896/-ugly-fonts-in-intellij-idea-community-edition-14-0-windows-8-1Audiovisual
@MattBall Not too sure what I should do with that. I am running Ubuntu. No idea how that answer is related to what I need (I don't have Windows 8 or MacType).Merce
But what do you actually want to ask? Because if all we have is the title, that's an off-topic question right there; ugly is a personal thing (I don't use IntelliJ, but like your second image more, for instance). Are you asking how to change the IntelliJ UI font? Because that should just be hitting up the menus mentioned on jetbrains.com/idea/help/configuring-colors-and-fonts.htmlTupper
@Mike'Pomax'Kamermans, I think he want to go back to what was like before (presumably without downgrading to 14.0). I would as well.Trunnel
@Mike'Pomax'Kamermans If you don't use IntelliJ maybe you shouldn't even be looking at this question, because its not for you. The second image evidently shows the font rendering incorrectly, with the characters stretched and the bottom of the characters with hanging stems such as the 'g' cut off. If you read my question you would realise that I exported the settings from 14.0 to 14.1 to make sure all settings are the same, so your settings comment is irrelevant. I am asking if there is something like a JVM setting that fixes it, or maybe someone knows if this is a bug in the new version.Merce
my point was "there's a font UI dialog, change the font". If the font changed from 14 to 14.3, just grab the font that came with 14, use that for 14.3, and if it's anything like any other java ide, that'll fix it. If it doesn't, or it's supposedly the exact same font, then you have important information to drop into your question, to highlight something weird is happening as of 14.3Tupper
@Mike'Pomax'Kamermans If you used IntelliJ you would know that it has an option to export and import all settings (colours, fonts, styles, brace conventions etc.), precisely to avoid these quirky situations. The font settings are exactly the same (its the first thing I obviously checked). Also those font settings you mentioned are only for the text pane with the source code, while I am referring to the rest like the Project View (screenshot), Menus and Dialogs, in which the bottom of text is literally cut off. My question is for who might have had the same issue and any pointers to solve it.Merce
I've noticed the same thing. I can't give a definitive answer, but the display font is derived from the system font, so you could change that, in my case I can also get a font I like by checking the box marked "not recommended" in "Appearance & Behavior" and selecting the next font size down. Either "solution" does not seem to be ideal - one changes my entire system and the other uses a not recommended option..Classmate
D
3

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.

Declared answered 24/9, 2015 at 23:34 Comment(5)
I tried the tuxjdk solution. I used a different solution, I just set the IDEA_JDK in the startup script idea.sh to point to the tuxjdk installation. The font is much better but its huge. The text spills out of dialog boxes etc. Is there a way to reduce it? (The setting of the font size in the Appearance settings just affects the source code font size in the editor)Merce
The only font size settings affect the text in the editor pane, not the dialogs or other panes in Intellij as far as I can tell. Please give my solution a try (and mark as correct if it worked for you). Everything should work for you straight away.Declared
OK. +1 and marked as answer as its the only solution that worked and fully describes the details of how to achieve it. I added a couple of extra details to it for whoever might need it.Merce
This is an extremely dangerous answer. People - do not use JDK built and hosted by an unknown person. What if it has an exploit inside? What if now it doesn't, but then somebody hacks their website and replaces it with one that does?Alimentation
Doesn't JetBrains warn against using any other JDK except Oracle's proprietary one?Bala
S
2

I am using OSX. It may not help.

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

Sesqui answered 10/11, 2015 at 6:45 Comment(1)
Not sure if this is good SO protocol, but upvoting because this helped me solve the problem on OSX, and this was the first/only solution I was able to find!Une
U
0

This might not be the answer you are looking for - but ever since I've started using tuxjdk, I haven't had problems any more with font rendering & intellij on ubuntu. Maybe give it a try?

Unaneled answered 3/4, 2015 at 20:19 Comment(1)
Not sure I got what you are suggesting. I need to use the Oracle Java 8 JDK.Merce
O
0

If you're willing to use the IntelliJ 15 EAP, there is an option for antialiasing (default is checked for me) that appears to match how it was rendered in 14. The option is under Appearance & Behavior -> Appearance:

enter image description here

I have tried all of the command-line arguments to try to get this behavior in 14.1, but was unsuccessful.

Overburden answered 29/7, 2015 at 17:57 Comment(7)
Just downloaded IntelliJ 15.0 and it doesn't have this option. Still the same problem :(Merce
@Merce It's there on my IntelliJ 15 Ultimate, not sure why yours looks different. There is an entire separate section called "Antialiasing" underneath the "UI Options" section -- you have to set the antialiasing mode to "Subpixel".Overburden
Ah yes that separate section I see. There isn't that LCD Rendering in IDE combobox though. It was already set to 'SubPixel' on both IDE and Editor. I also tried the tuxjdk solution, which makes the fonts look better but huge. I don't know if its possible to change the font size used by the IDE (not the font size of the source code editor, thats possible)Merce
It's worth noting that subpixel only works properly if you're running IntelliJ on the bundled JRE.Overburden
Well I just installed unzipped it and ran idea.sh. I didn't touch anything. I don't know if by default it uses the bundled JRE or not. On IntelliJ 13 and before this always worked fine and I never had font issues. This problem only cropped up with IntelliJ 14 and onwards, they changed something weird. The best result I got is the tuxjdk solution, but then you have to enforce the Font (I just chose Arial, not the best looking but at least it is good) and the Size... or otherwise you get these huge fonts that overflow... not a clean solution but at least decent.Merce
@jbx: Same here, it just started happening on IDEA 14. You can check which JRE is being used by going to "About IntelliJ IDEA" in the menu -- next to "JVM" you should see something like "OpenJDK 64-bit Server VM by JetBrains s.r.o". The steps that IDEA uses to determine which JRE to run under is documented at: intellij-support.jetbrains.com/hc/en-us/articles/…Overburden
@jbx: Screenshot of the anti-aliasing settings (on OSX, not sure if it matters): i.sstatic.net/G6aiz.pngOverburden

© 2022 - 2024 — McMap. All rights reserved.