Re: Greek fonts, again

Hi John:

In today's VisAD release, HersheyFonts have be added to the TextControl
and also to AxisScale. In both of these, the "setFont()" methods now
accept either a java.awt.Font or a visad.util.HersheyFont.

Also, in visad/examples/ScaleTest, the HersheyFonts distributed with
VisAD have been added to the end of the "list of fonts", so you can view
them easily.

The advantage of these changes for you is that you can now take one of
the standard HersheyFonts (like futural) and combine that with the greek
font which is in the ZIP file pointed to in the VisAD homepage:

    http://www.ssec.wisc.edu/~tomw/hersheyfonts.zip

to produce a single font that you could use to combine text.

For example, this jython script:

  a=load("AREA0001")
  d=image(a)
  drawString(d,"Why is \xc2 = 3.14?",(100,600), font="combo")
  saveplot(d,"greek.jpg")

produced the jpeg at:  http://www.ssec.wisc.edu/~tomw/greek.jpg

All I did was to edit up the "futural.jhf" file, and append the entire
contents of the "greek.jhf" file.  A little hunting told me that 'beta'
was at position 194 (0xc2 -- there is a built-in offset of 32 decimal).
If you don't want to mess with this, I'd be happy to send it to you.

I also should add that I'm working on a HersheyFont for the WMO present
weather, cloud, sky cover, and barometric tendency symbols. While the intent is to create a high-level interface to get VisADGeometryArrays for these, by creating them as a HersheyFont means they'll be available for other applications as well. Stay tuned...

tom

--
Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Phone/VoiceMail: 608/262-2759
Fax: 608/262-5974


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: