FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 04-17-2011, 06:11 PM
Giovanni Mascellani
 
Default Font handling with OpenJDK VM

Hi all.

I received a bug for Josm that I'm not sure whether it's a Josm bug or a
more general bug in the OpenJDK Virtual Machine:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620385

and especially:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620385#20

It appears that Java programs are not able to handle fonts that miss
defoma hints. Anyway, I'm not expert on this matter: could someone help
me to understand where is the problem?

Thanks, Giovanni.
--
Giovanni Mascellani <mascellani@poisson.phc.unipi.it>
Pisa, Italy

Web: http://poisson.phc.unipi.it/~mascellani
Jabber: g.mascellani@jabber.org / giovanni@elabor.homelinux.org
 
Old 04-17-2011, 10:29 PM
Paul Wise
 
Default Font handling with OpenJDK VM

OpenJDK doesn't have any defoma backend so it is highly unlikely that
defoma has anything to do with this.

It appears that paths to fonts are hardcoded in these files:

/etc/java-6-openjdk/fontconfig.*
/usr/lib/jvm/java-6-openjdk/jre/lib/fontconfig.*

Despite the name these appear to have nothing to do with the standard
method for finding fonts on Linux (fontconfig):

http://download.oracle.com/javase/1.5.0/docs/guide/intl/fontconfig.html
http://www.freedesktop.org/wiki/Software/fontconfig

This OLPC bug seems to explain the situation well:

https://dev.laptop.org/ticket/8348

Probably OpenJDK upstream needs to gain support for using fontconfig
to dynamically find fonts on Linux.

--
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTikxsKfsvcSrbFNxeJvWSd9iQ=3saA@mail.gmail.com ">http://lists.debian.org/BANLkTikxsKfsvcSrbFNxeJvWSd9iQ=3saA@mail.gmail.com
 
Old 04-18-2011, 10:54 AM
Giovanni Mascellani
 
Default Font handling with OpenJDK VM

Hi.

On 18/04/2011 00:29, Paul Wise wrote:
> OpenJDK doesn't have any defoma backend so it is highly unlikely that
> defoma has anything to do with this.

I did some more testing and can confirm your sentence: what OpenJDK uses
of the package sun-java6-fonts is just that it exposes via some symlinks
a few fonts (from the Lucida family) that are in a private directory of
Sun VM. Copying those TTFs somewhere (like /usr/local/share/fonts or
~/.fonts), removing sun-java6-fonts and trying Josm with some Thai
writings appears to work well.

> It appears that paths to fonts are hardcoded in these files:
>
> /etc/java-6-openjdk/fontconfig.*
> /usr/lib/jvm/java-6-openjdk/jre/lib/fontconfig.*

These files don't appear to have any reference at all to some Lucida
font. Thus there must be something hardcoded or configured somewhere
else. Moreover, the problem doesn't appear to be full-path vs. logical
name (resolved dynamically), because OpenJDK actually seems to be able
to find the font even in /usr/local/share/fonts or ~/.fonts.

Then the question turns out to be: who is convincing OpenJDK that it has
to use Lucida to display Thai glyphs, instead of using one of the other
available fonts?

I'll try to investigate it more.

> Despite the name these appear to have nothing to do with the standard
> method for finding fonts on Linux (fontconfig):
>
> http://download.oracle.com/javase/1.5.0/docs/guide/intl/fontconfig.html
> http://www.freedesktop.org/wiki/Software/fontconfig
>
> This OLPC bug seems to explain the situation well:
>
> https://dev.laptop.org/ticket/8348
>
> Probably OpenJDK upstream needs to gain support for using fontconfig
> to dynamically find fonts on Linux.

This would be a great thing.

Thanks for your help, Giovanni.
--
Giovanni Mascellani <mascellani@poisson.phc.unipi.it>
Pisa, Italy

Web: http://poisson.phc.unipi.it/~mascellani
Jabber: g.mascellani@jabber.org / giovanni@elabor.homelinux.org
 

Thread Tools




All times are GMT. The time now is 05:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org