On Thu, 27 Apr 2000, Kevin A. Burton wrote:
> > that sucks. i'm using XFree86 4.0 here with the ATI server on a Rage64
> > card and it works great. what card/server are you using?
> The Diamond Viper V555 (TNT).
oh. i don't even know why i asked, since i barely know enough about X to
capably edit my XF86Config by hand.
> Things are still settling down in the XFree86 4.0 area :(
yeah, i know. i'm still waiting to install XFree86 4.0 at home since the
S3 driver has yet to be ported, and i have a 4 year old card there.
> > by the way, for anyone who is still having trouble getting their fonts to
> > work in java under X, i have finally figured out how to reliably produce a
> > decent font.properties file and would be willing to help people with
> > getting it set up correctly.
> YES!!! I would love that!!!!! This really needs to be an a HOWTO IMO.
> I have spent a lot of time (actually *way* too much time) trying to get
> the Blackdown JDK to work. Are you using TTFs or just bitmapped fonts?
> For some reason I am only able to get certain fonts to work. Also, what
i am using TrueType fonts for the main faces, and Type1 fonts for the
auxilliary stuff (dingbats and symbols). Java2 VMs cannot use anything but
scalable fonts (TrueType, Type1, F3, etc.). i believe the reason has to do
with affine font scaling in Java2D.
i am using Blackdown 1.2.2 RC4.
the reason that only some fonts work is probably that you are trying to
use bitmapped fonts. to get a listing of the fonts that Java can use,
from your X server, run the following command:
xlsfonts | grep '0-0-0-0'
as far as i can tell, this will only return the scalable fonts supported
by your X server. with this list of usable fonts, you can start filling in
the holes in the font.properties file.
since i was going to be using TrueType fonts (Times New Roman, Arial, and
Courier for serif, sansserif, and monospaced respectively), i decided to
start with the font.properties.tt file in the Blackdown distribution.
with the font.properties.tt file renamed to font.properties, i started a
Swing app (Jason's font chooser, since it seemed appropriate). on startup,
the first error i encountered was for the following font:
-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1
looking through my list of scalable font strings from xlsfonts, i found
the one that matched this most closely. in my case, the font i want to use
-monotype-times new roman-medium-r---0-0-0-0-p-0-iso8859-1
to get a font string suitable for font.properties, you have to abstract
away some of the definition. the part to change fits the following
pattern (m is monospaced, p is proportional, but i don't know what c is,
it should be changed to:
this is a printf format string, where the point size is a decimal integer
so, the font string to use as the replacement should be:
-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso8859-1
i used perl to do the replacements, but you could equally well use sed or
awk (or just do it in jEdit).
for each distinct font error you get, you have to determine a suitable
replacement font in this manner. most of the differences between the
font.properties.tt and my font.properties ended up being little stuff like
'regular' weight v. 'medium' weight, or 'o' for oblique instead of 'i' for
italic. a couple may have also had a different foundry and registry
(theirs was adobe, mine was urw). [xgk]fontsel is a blessing in performing
this task, but most of the time the xlsfonts output it a good enough guide
if you know your fonts well and don't have too many of them.
this process often has to be repeated through a number of iterations,
since i believe java stops checking when one part of a symbolic font
definition fails. that is, if serif.0 fails, serif.1 and serif.2 will not
cause an error message. however, serif.italic.0 still will if it is
the other hard part is getting dingbats and symbol fonts that will work. a
lot of blackdown users seem to report that dingbats is broken, but i think
that symbol probably is also broken for most of them, due to the method of
font error checking described above. at least that's what i found once i
fixed my dingbats font.
i got the dingbats and symbols fonts from the URW font distribution. this
is available in the urw-fonts package for RPM users, or via FTP from the
ghostscript or gimp FTP sites. i think they might also be in the
ghostscript-6.0 packages from alladin (the non-GPL'd version). it would be
nice to have a fixed-width font for the dingbats and symbols fonts, but
unfortunately i have only proportional ones.
i have done the above procedure both with all Type1 fonts (using the URW
nimbus fonts for the logical fonts), and with a mixture of TrueType and
Type1 (as described above). as i was led to expect from the scanty
documentaion, it doesn't seem to make any difference as long as the font
i hope this helps. here's a URL that might be of use: