Subject: pkgsrc/lang/sun-jdk: Swing can't find Symbol font
To: None <netbsd-users@netbsd.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: netbsd-users
Date: 10/04/2001 00:08:10
On a freshly installed 1.5.2/i386, with sun-jdk-1.3.1.0.1 installed from
pkgsrc, I am able to run a simple command-line "Hello World" program. But
if I try to have it display instead in a JFrame, it fails with the
following error, repeated 20 times:

"Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]"

(Not coincidentally, 20 is the number of times the Symbol font is
referenced in /usr/pkg/java/jre/lib/font.properties.)

I was surprised by this. xfontsel says there really is a Symbol font
available to X, which is what I expected. I tried adjusting the
definitions in the font.properties file to match what xfontsel said. No
dice.

Then I noticed that the font.properties file states near the top: "Notice
that we use the .ttf files shipped in the JDK distribution." So I looked
in /usr/pkg/java/jre/lib/fonts, and found:

LucidaBrightDemiBold.ttf
LucidaBrightDemiItalic.ttf
LucidaBrightItalic.ttf
LucidaBrightRegular.ttf
LucidaSansDemiBold.ttf
LucidaSansDemiOblique.ttf
LucidaSansOblique.ttf
LucidaSansRegular.ttf
LucidaTypewriterBold.ttf
LucidaTypewriterBoldOblique.ttf
LucidaTypewriterOblique.ttf
LucidaTypewriterRegular.ttf
fonts.dir

Can't blame Swing for not finding a Symbol font. There isn't one! How
should I go about remedying this so that I can run my Swing programs using
this package?

Thanks,

- Amitai