A fix for font ugliness under Linux

Download and install both the JDK and JRE, possibly modify clion.sh script to make sure right version of Java is invoked:

######
# ---------------------------------------------------------------------
# Run the IDE.
# ---------------------------------------------------------------------
#LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" \
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "/usr/lib/jvm/java-8-openjdk/bin/java" \

#######


The files are tar'd up directory trees - expand them as root under "/" . Someone was nice enough to patch open source Java JDK to fix the issue.

Should be applicable to entire suit of products, not only clion

https://www.dropbox.com/sh/33ia4nzd2cdigvy/AADzw5132rjMLi5GhMKxgrOma?dl=0

5 comments
Comment actions Permalink

There is no need to modify clion.sh, you just need to set CL_JDK environment variable:
env CL_JDK=/usr /usr/bin/clion

I have a perfect font rendering in the CLion and Linux (freetype2-infinality). I use JDK7 with fontfix patch. Additionally, I've patched it myself to remove gamma correction:

--- openjdk/jdk/src/share/classes/sun/java2d/SunGraphics2D.java.orig 2014-08-29 21:35:06.000000000 +0400
+++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphics2D.java 2014-09-15 23:16:11.527241569 +0400
@@ -193,7 +193,7 @@

     /* A gamma adjustment to the colour used in lcd text blitting */
     public int lcdTextContrast;
-    private static int lcdTextContrastDefaultValue = 140;
+    private static int lcdTextContrastDefaultValue = 100;

     private int interpolationHint;      // raw value of rendering Hint
     public int strokeHint;


The text was too pale without my patch. Hope this information can be useful to someone.
0
Comment actions Permalink

Good stuff. From what I read, lots of folx were struggling to get fonts looking good under Linux, accross the JB product range.
Also saw something (dated) from JB person, saying that it is due to inherent Java defficiency. After looking around, I found a fix for the issue - one that I posted in 1st post.

W/o the fix, the fonts look very ugly - very thin and jagged.

0
Comment actions Permalink

Hi, how did you install the infinality patch? Thanks!

0
Comment actions Permalink

If you're using arch, install the aur package. If you're using ubuntu or one of the variants, follow these instructions: http://www.webupd8.org/2013/06/install-openjdk-patched-with-font-fixes.html 

0

Please sign in to leave a comment.