comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Displaying degree symbol with Postscript fonts
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Displaying degree symbol with Postscript fonts [message #61498] Thu, 17 July 2008 11:33 Go to next message
Kenneth P. Bowman is currently offline  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 Go to previous message
Matthias Cuntz is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Displaying degree symbol with Postscript fonts
Next Topic: Invoking a COM object method, that results in two arrays

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:39:16 PDT 2025

Total time taken to generate the page: 0.00547 seconds