On Tue, 17 Oct 2000, Barnet Wagman wrote:
> > To get nice antialiased fonts you have to install
> > the Fonts into $JDKHOME/jre/lib/fonts/. You can then use the fonts inside Java
> > applications without the need for TrueType support in X
>
> (1) Can you put TrueFonts (*.ttf) into $JDKHOME/jre/lib/fonts/ ?
>
> (2) If the same font is in $JDKHOME/jre/lib/fonts/ and it the X font server,
> which will Java use? Can we force Java to look in $JDKHOME/jre/lib/fonts/
> first?
>
> (3) Does the $JDKHOME environmental variable need to be set in order for this to
> work. (I've been using jdk 1.3 (Sun and IBM) and jdk 1.2 (Blackdown) without
> it.)
I spent two days going over JDK 1.2.2's JVM with strace trying to debug
font issues. Here's what I learned:
The JVM queries the X server for its font path. It takes this path
and visits each directory listed, opens the fonts.dir file, and parses it for
TrueType fonts. It doesn't just ask the X server for the fonts list, it
pulls it directly from the host's own disk!
This is a major problem for users wishing to run Java apps to remote X
displays--Java assumes the X display is the local host with access to the
local host's font lists. This is not at all true for remote X support.
(I'm not even touching the X performance issues...)
I tried adding TrueType fonts to my linux installation's jre/lib/fonts
but it ignored them. I presumed this was because metrics information for
those files is not present in font.properties. But, since I could find NO
documentation for the metrics content of this file, I never was able to get
them working.
Java's Fonts support for Unix/X basically sucks rocks. The only reason it
works as well as it does is because the default TrueType fonts are now
provided with the JVM.
--
Joi Ellis Software Engineer
Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED]
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]