Quantcast
Viewing latest article 8
Browse Latest Browse All 10

Font rendering on Fedora 20 including IntelliJ IDEA Eclipse

I’ve made a short note about it before. Here is similar but a slight different approach and detail. If you have gnome-tweak-tool and have done tweaking font setting, it should probably look like this.

[username@localhost ~]$ xrdb -query
Xft.antialias:  1
Xft.dpi:    96
Xft.hinting:    0
Xft.hintstyle:  hintnone
Xft.rgba:   rgb

Then install freetype-freeworld from rpmfusion.org repo.

# yum install freetype-freeworld

Then do this to actually enables the subpixel rendering from freetype-freeworld.

$ cd ~username
$ touch .Xresources
$ echo "Xft.lcdfilter: lcddefault" > .Xresources

Reboot the system. After reboot, improvement on system font rendering is very obvious. And now xrdb query should look like this.

[username@localhost ~]$ xrdb -query
Xft.antialias:  1
Xft.dpi:    96
Xft.hinting:    0
Xft.hintstyle:  hintnone
Xft.lcdfilter:  lcddefault
Xft.rgba:   rgb

After that you can optionally install more fonts into ~username/.font.

  • Grab Liberation fonts version 2. There is no liberation-fonts-2 package avaliable yet for Fedora 20 right now.
  • Grab Ubuntu fonts pack.
  • Grab fonts from any running Windows machine C:\Windows\Font folder. (note: I don’t prefer installing using corefonts or mscorefonts what so ever font packs and techniques. All these package and techniques are obsolete. In Fedora 20 or any distro with latest Genome desktop, font installation should be pretty straight forward. Drop into your home .font folder. That is. If you have doubt, run font cache refresh command-below- or just try reboot or logout-login again.)

Then refresh font cache.

$ fc-cache -rv

Google search keyword term for this is fedora+subpixel+rendering.


Now let’s make IntelliJ IDEA looks good. Add these to idea.vmoptions for 32bit and idea64.vmoptions for 64bit under IDEA_INSTALLED_DIRECTORY/bin/.

-Dawt.useSystemAAFontSettings=lcd
-Dswing.aatext=true
-Dsun.java2d.xrender=true

Google search keyword term for this is idea+vmoptions+font. Furthermore, JDK (probably for OpenJDK7) Swing package has some issue with font hinting. If this is the case, you can remove font hinting as described in this post or this post. But this step may not be required if you are already satisfied the output with the font you chose for editor.

Anyway none of the above fixes still do not help so much for IntelliJ IDEA on Fedora/Linux yet. That is comparing with Eclipse, STS. In IDEA blog article, it is said that the issue is related to JDK Swing problem link1, link2, link3.

For Eclipse/STS, it looks pretty great just right after subpixel rendering workaround have done on Fedora 20. Just get to install Jeeeyul Eclipse theme from Eclipse marketplace. Then make ~/.gtkrc-2.0 fix for huge tab. Then go to Window > Preferences > General > Appearance > Jeeeyul's Themes > Parts > Layout > Tab Height to 26 pixel.

Further tech reading about font rasterization…


UPDATES: The best render font?

  1. The best render font for system wide is Ubuntu font pack – sorry RedHat font pack(Bitstream Vera, Liberation, DejaVu), Ubuntu still win in this – that set it through gnome-tweak-tool.
  2. For IntelliJ IDEA is ”Liberation Mono” at size 13. ”Ubuntu Mono” render good on Gnome terminal but too small and hinting seems not working properly in IDEA. Second choice is the default ”DejaVu Mono”.

Screenshots – click for 100% zoom view for the diff.
Image may be NSFW.
Clik here to view.
Alt text

Image may be NSFW.
Clik here to view.
Alt text


Viewing latest article 8
Browse Latest Browse All 10

Trending Articles