• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Verdana --really-- in an applet...

 
Tom McComb
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a beautiful applet for navigation in a website, but the customer really wants to see Verdana Font.
Although I create a Font using "Verdana", it shows a default sans-serif font (I think it's Arial).
How do I load Verdana so I can really use it instead of the default?
Thanks for any help you can give me.

------------------
Tom McComb
 
Tom McComb
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright - I can get ahold of Verdana using
<code>
GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts()
</code>
but this is only in 1.2 and later APIs. What can I use in 1.1?
Thanks.
------------------
Tom McComb
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might ask in the Swing/AWT forum.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it would be possible to load other fonts in an applet using pre-1.2 ... One old workaround to the font problem that I have heard of is messing around with the fonts in your java/lib/fonts directory and editing some property files... obviously this won't work in an applet...

It's kind of cheating... but if there are only a few labels you'll need in Verdana, why not just make some small images of the words in Verdana font and put them in the applet? If the text you need to display is dynamic, though, this won't work...

-Nate
 
Paul Bailey
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you could seralize the font you are interested in.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic