> I am trying to include a true type font that I have built into java. Shall I
have to change the JAVA_FONTS variable or go through making a new
font.Properties file ?
> I have already installed the font on my system and can work on it in
windows.
The 1st step is to make your font available to the Java runtime.
If you are running on Windows, just copy it into the c:\windows\fonts
directory.
If you are running on Solaris, its a bit more tricky, and may mean building
a new font directory, adding it to your X font path and setting JAVA_FONTS
so that JDK knows to look there.
JAVA_FONTS sets the path rather than augmenting it, so if you used this
you would have to know all the locations Java used and add those in
as well as your new location.
font.properties is for defining which of the fonts on the system
that are available to the Java runtime are to be used for the logical
fonts such as "serif", "sanserif".
You only need edit that if, once you've made your font available you want to
use it a logical font.
If on the other hand you just want to be able to use it explictly
by name, you should call Font.getAvailableFontFamilyNames() and you
should find its family name amongst those returned.
The font's name will then be usable in Font() constructors.
Finally, whilst al of the above applies to Java 2 V1.2 and V1.2.2, there
is another approach possible with the beta of Java 2 V1.3 which is available
on developer.java.sun.com as of last week.
It has a new static method Font.createFont(InputStream in, etc ..) which
means that dynamically, from a running Java program, you can access a new
TrueType font from anywhere you can get an InputStream (eg disk, jar file,
over http etc ..).
-Phil.
===========================================================================
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".