Hiho,

On Tue, Oct 17, 2000 at 08:07:39AM +0200, Carsten Schaefer wrote:
> I'm using jdk1.3 from Sun with SuSE-Linux 7.0.
> I have installed XFree 4.0.1 and xfstt and some windows
> truetype-fonts.
> They work with netscape but not with java.

They should work with Java too, but the font names might be a bit different
(things like case, etc). Write a short test application to print out all
available Font names via GraphicsEnvironment.getAllFonts().

There is a problem with X Fonts though. X Fonts are only black & white bitmaps
that can not be antialiased. 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 and you can turn on
text antialiasing via putting the following method in your Swing components:

----- snip -----
        public void  paintComponent( Graphics  g ) {
                Graphics2D  g2 = ( Graphics2D ) g;
                g2.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING,
                        RenderingHints.VALUE_TEXT_ANTIALIAS_ON );
                super.paintComponent( g2 );
        }
----- snap -----

Hope this helps.

   bye...
         Andreas Micklei

-- 
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