PDA

View Full Version : [ubuntu] Subpixel rendering in Java?



Munchkinguy
December 29th, 2008, 04:25 AM
All of my Java applications look strange on my laptop because everything else has subpixel rendering, but the Java apps don't. How do I enable subpixel rendering for all Java applications in Ubuntu (Intrepid)?

Zorael
December 29th, 2008, 05:34 AM
Don't Java programs read ~/.fonts.conf for that? Make sure yours looks something like this. If you don't have one, create it.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
<match target="font" >
<edit mode="assign" name="embeddedbitmap">
<bool>true</bool>
</edit>
</match>

<match target="font" >
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>

<match target="font" >
<edit mode="assign" name="autohint">
<bool>false</bool>
</edit>
</match>

<match target="font" >
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>

<match target="font" >
<edit mode="assign" name="hintstyle">
<const>hintfull</const>
</edit>
</match>

<match target="font" >
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
</fontconfig>
You just need to close and reopen any applications to see the changes take effect.

Munchkinguy
December 30th, 2008, 03:20 AM
That's a much handier way for configuring my QT applications, but it doesn't work for Java.

Zorael
December 30th, 2008, 04:03 PM
Hmm. What of fontconfig, then?

$ sudo dpkg-reconfigure fontconfig-config
Native
Always
Yes

$ sudo dpkg-reconfigure fontconfig

Munchkinguy
December 31st, 2008, 06:29 PM
It's still the same.

Munchkinguy
January 2nd, 2009, 06:50 AM
I've been using Sun's proprietary Java but Freetype seems to have been implemented only in OpenJDK. So I'm going to install OpenJDK and see if there's any difference.

Munchkinguy
January 5th, 2009, 03:46 AM
No, that didn't seem to work either.

benjabean1
June 2nd, 2011, 12:43 AM
Bump