[OpenJDK 2D-Dev] [PATCH FOR REVIEW] Fixed linux.fontconfig.Fedora.properties

Jiri Vanek jvanek at redhat.com
Fri May 25 11:19:41 UTC 2012

On 05/24/2012 06:14 PM, Phil Race wrote:
> How did you verify this ? I ask because this file will be (or should be!)
> completely ignored by JDK 7 and 8, since it does not have a name that
> precisely references Fedora.16 - ie distro AND variant.

I have testfile which generate few hundred Chinese/Indian/Korean/Japan chars in bold/italic/normal 
and in different styles (Serif/Sanserif/Dialog....). Without my patch a lot of characters were not 
rendered correctly. With - only two of them have failed. Imho - it would be nice to have it in jck.

AFIK there is fall back in fontocnfig - it tries  linux.fontconfig.Fedora.VERSION.properties  first, 
if not found then linux.fontconfig.Fedora.properties if nto found then linux.fontconfig.roperties 
(if  not found then  fontconfig.properties?).  For icedtea6 I have patched jdk/make/sun/awt/Makefile 
to have
linux.fontconfig.Fedora.properties as default with configuration for most recent fedora and had 
copies with older Fedoras' fontconfigs. Yah - a lot of maintenance! We had also patch to support 
subversions (eg linux.fontconfig.Rhel.6.3.properties x linux.fontconfig.Rhel.6.2.properties x 
linux.fontconfig.Rhel.6.properties x linux.fontconfig.Rhel.properties)

Because I have not seen something similar in Openjdk7 i used this default - 
linux.fontconfig.Fedora.properties and it worked as expected.

> In general I am not sure there is even a point to maintaining this file since
> we have code in JDK 7 that pulls the logical font definitions from /usr/lib/fontconfig
> APIs at runtime and so we should match the native desktop without the maintenance
> burden.

This is awesome! Thanx so much for finally replacing java's "artificial font configuration".  When 
this change will reach release? Maybe  I can push my change to used branches only...

But for sure I will follow your advices.

> The only reason I can think of for having these files any more is if you consciously
> want something very different than GTK/Qt/etc is using ..

I definitely don't think this is what I want:)

> -phil.
> On 5/24/2012 12:45 AM, Jiri Vanek wrote:
>> Hi all!
>> http://jvanek.fedorapeople.org/oracle/jdk7/webrev/ and
>> http://jvanek.fedorapeople.org/oracle/jdk8/webrev/ (actually they are same) are my fixes for
>> Fedora's fontconfig.
>> They are sync with newest stable release.
>> Although this is my first contribution to OpenJDK I have pushed this change to IcedTea6 already
>> some time ago.
>> I have successfully tested this on OpenJDK7 head i386 and x86_64. I was not able to verify jdk8
>> because I have failed to Build OpenJDK8 (But I'm working on it!), but AFAIK the fontconfig
Still not done. Few time left and gcc in f17 behaving out of my scope :(.
>> algorithm have not changed.
>> Also I have noticed that there is no linux.fontconfig.Rhel.properties. I have handled this one for
>> IcedTea6 too. How do you see possible addition of this file?
>> Looking forward to contribute to OpenJDK7/8
>> Best regards
>> Jiri Vanek

More information about the 2d-dev mailing list