[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: true type font orientation



R.Bauer (R.Bauer@fz-juelich.de) writes:

> please give me a small example how to use hardware fonts with surface or
> shaded surface.
> 
> Always I am trying they are always not rotated enough.

First of all, "rotated hardware fonts" is an oxymoron.
It's not going to happen. (Unless your "hardware" happens
to be PostScript, then you might have a chance.)

What you can get are true-type fonts, which will *look*
like hardware fonts and can be rotated. For example,
like this:

   IDL> Shade_Surf, dist(20), ZTitle='Meters', YTitle='Latitude', $
      XTitle='Longitude', Font=1, Charsize=3

Sometimes the true-type fonts don't look as nice as
you would hope on the display, although they do look
beautiful in hardcopy output.

If display aesthetics are important, you can try a trick
like drawing your graphic in the Z-graphics buffer at
4-5 times the resolution, then rebining it for the
display. (I include an example of this below.)
Unfortunately, this trick is a little bit too color
dependent for my taste. I haven't had the time to
investigate exactly why that is, but if you can get
away with black or white output, it does a nice
job.

Cheers,

David

--

PRO NiceAxisLabels

LoadCT, 0
data = Dist(41)
Device, Decomposed=0

TVLCT, [255, 0, 80], [255, 355, 80], [0, 0, 80], 1

Device, Set_Font='Helvetica*14*Bold', /TT_Font
Window, 1, XSize=400, YSize=400, Title='Normal Window', $
	XPos=0, YPos=10
Surface, data, XTitle='X Axis', YTitle='Y Axis', $
   ZTitle='Z Axis', Font=1, Charsize=3, Color=255, $
	Background=3, Position=[0.2, 0.1, 0.9, 0.9, 0.1, 0.9]

thisDevice = !D.Name
Set_Plot, 'Z'
!P.Charsize = 1.0
Device, Set_Resolution=[1600,1600]
!X.Thick = 4
!Y.Thick = 4
!Z.Thick = 4
Surface, data, XTitle='X Axis', YTitle='Y Axis', Thick=4, $
   ZTitle='Z Axis', Font=1, Charsize=12, Color=255, 
   Background=3, Position=[0.2, 0.1, 0.9, 0.9, 0.1, 0.9]
!X.Thick = 1
!Y.Thick = 1
!Z.Thick = 1
snap = TVRD()
Set_Plot, thisDevice
Window, 0, Title='Enhanced Window', XSize=400, $
   YSize=400, XPos=410, YPos=10
TV, Rebin(snap, 400, 400)
END

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155