Hiho,

On Tue, Oct 17, 2000 at 10:34:01AM -0500, 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/ ?

Yes. And probably ONLY TrueType fonts because that is what the JDK uses
internally for its standard fonts. Just look 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?

On my system it works like this: The fonts supplied from inside the JDK and by
the X server have slightly different names. While the fonts supplied by the X
server start with an upper case letter and then only contain lower case
letters, the fonts inside the JDK also contain some upper case letters inside
the font name. This has nothing to do with the filenames of the TrueType
fonts, but with the font names inside the TruType fonts which are obviously
interpreted differently by Java and by X. Under Windows thing might even be
slightly different, so you might have to try loading a font under different
names, until you succeed.

Example:

Filename: MYFO-GRN.TTF

Java font name:           Myfont-GroteskNor
Java font name via X11:   Myfont-grotesknor

I am not sure if the names can have more differences besides the case. As said
before: Write a test application which prints out the names of all installed
fonts and find out yourself for your particular fonts.

> (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.)

No. But it is generally a good idea because some installers of third party
software expect it to be set. So it does not hurt.

> Thanks, the X-Java-font  business has been bothering me.

Me too. It took us quit some time to get this straight here. Finally this is a
way to deploy applications with anti-aliased fonts under Linux in an easy way.

-- 
Andreas Micklei
IVISTAR Kommunikationssysteme AG
Ehrenbergstr. 19 / 10245 Berlin
http://www.ivistar.de


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to