• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might ask in the Swing/AWT forum.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you could seralize the font you are interested in.
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic