I use JDK1.3 winNT. JDK1.3 claims that it can load fonts dynamically.

The problem I have is I am unable to use this feature because by default
Font.createFont() method returns a font with size=1. But when I tried to
change the size by deriveFont(int size)         method I doesn't change the size too.
Only place where it works correctly is when I tried to get the font family
name by getFamily(). It works as expected.

Has anyone tried this? did it work? is it a known bg?
Any information regarding this will be appreciated.
Thanks in advance,
Rajan
====
P.S: The code fragment I tried is as follows:

                FileInputStream in=null;
                Font myFont =null;

                try{
                 in = new FileInputStream("Sri-tsc.ttf");
                 myFont = Font.createFont(Font.TRUETYPE_FONT,in);


                 }
                catch(Exception ex)
                {
                 System.out.println(ex);
                }
                 System.out.println(myFont.getSize());   // size 1
                 System.out.println(myFont.getFamily());
                 myFont = myFont.deriveFont(12);
                System.out.println(myFont.getSize());   // even this is size one


===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to