Displaying degree symbol with Postscript fonts [message #61498] |
Thu, 17 July 2008 11:33  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
This is one of those things that everyone but me probably already
knows.
To display the degree symbol in most Postscript fonts
(glyph B0 in hex), you have to set the /ISOLATIN1 keyword via the
DEVICE command. This is not the most obscure feature that I
have ever seen in IDL (perhaps we should start a top 10 list),
but it is right up there.
Ken Bowman
|
|
|
Re: Displaying degree symbol with Postscript fonts [message #61561 is a reply to message #61498] |
Fri, 18 July 2008 14:19  |
Matthias Cuntz
Messages: 3 Registered: August 2006
|
Junior Member |
|
|
Dear Ken,
I do not use the isolatin1 keyword because I want to have the per mil
sign, which is gone from the postscript fonts with isolatin1.
So I always use number 176 of the symbol font, which is the degree sign
regardless of isolatin1. Try:
set_plot, 'PS'
stdfont='!4' ; almost whatever you want
xyouts, 0.1, 0.7, font=0, $
stdfont+'Degree Celsius: !9'+string(byte(176))+stdfont+'C'
xyouts, 0.1, 0.4, font=0, $
stdfont+'Per mil: '+string(byte(189))
device, /close
Cheers
Matthias
Kenneth P. Bowman wrote:
> This is one of those things that everyone but me probably already
> knows.
>
> To display the degree symbol in most Postscript fonts
> (glyph B0 in hex), you have to set the /ISOLATIN1 keyword via the
> DEVICE command. This is not the most obscure feature that I
> have ever seen in IDL (perhaps we should start a top 10 list),
> but it is right up there.
>
> Ken Bowman
|
|
|