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

Home » Public Forums » archive » Re: Setting and unsetting the vector font number
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
Re: Setting and unsetting the vector font number [message #34644] Wed, 09 April 2003 01:59
Kristian Kjaer is currently offline  Kristian Kjaer
Messages: 58
Registered: June 1998
Member
I now do that before entering postscript mode, and again after exiting
ps mode to set the font back. (It doesn't work while in ps mode.)

Thank you for that useful trick.
- Kristian


David Fanning wrote:
> When you are done with your plots, however, you could
> also just open a small pixmap window and write some text
> there to flip the font back to whatever:
>
> Window, /Pixmap, /Free, XSize=50, YSize=50
> XYOutS, 0, 0, '!3Nonsense'
> WDelete, !D.Window
Re: Setting and unsetting the vector font number [message #34704 is a reply to message #34644] Fri, 04 April 2003 07:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kristian Kjaer (Kristian.Kjaer@Risoe.DK) writes:

> But I want the tickmark numbers etc. in the fancy font too, without
> having to generate those strings myself with xtickname. I thought I
> could remember that I can achieve that by setting then font at the very
> beginning and only resetting it at the very end.

You are probably remembering correctly (although I don't know
what the hell you are talking about). :-)

When you are done with your plots, however, you could
also just open a small pixmap window and write some text
there to flip the font back to whatever:

Window, /Pixmap, /Free, XSize=50, YSize=50
XYOutS, 0, 0, '!3Nonsense'
WDelete, !D.Window

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Setting and unsetting the vector font number [message #34705 is a reply to message #34704] Fri, 04 April 2003 06:51 Go to previous message
Kristian Kjaer is currently offline  Kristian Kjaer
Messages: 58
Registered: June 1998
Member
Thanks.
But I want the tickmark numbers etc. in the fancy font too, without
having to generate those strings myself with xtickname. I thought I
could remember that I can achieve that by setting then font at the very
beginning and only resetting it at the very end.

- Kristian

Paul van Delst wrote:
>
> What about the !X command? E.g.
>
> PLOT, mydata, TITLE="!5Title of my plot!X"
>
> ?
>
> Doesn't this set the font to #5 and then switch it back to whatever the font was before
> the command? I always use !X when I change fonts in a test string, e.g. like when you want
> to insert greek letters and such (although that's an easy error to catch since it's all
> Greek to me after that :o)
>
> It's an extra "!X" in every string you want to change, but that's a lot easier than trying
> to remember to switch it back at one particular spot. (At least I think so)
>
> paulv

> Kristian Kjaer wrote:
>>
>> IDL5.6 help says:
>> <quote>
>> Once the vector font system is selected, use an embedded formatting
>> command to select a vector font (or fonts) for each string. (See
>> Embedded Formatting Commands for details on embedded formatting
>> commands.) The font selected "sticks" from string to string; that is, if
>> you change fonts in one string, future strings will use the new font
>> until you change it again or exit IDL.
>>
>> For example, to use the Duplex Roman vector font for the title of a
>> plot, you would use a command that looks like this:
>>
>> PLOT, mydata, TITLE="!5Title of my plot"
>> </quote>
>>
>> So to have all of the lettering in font !5 (including the numbers near
>> the tickmarks, etc.) one has to include "!5" in the first string
>> processed by IDL in the plot command, and to reset to the default font
>> one must end the _last_ string by "!3".
>>
>> Somewhere I read which this first and last string are, but now I can't
>> find it.
>> Does anyone remember?
>>
>> Any other ideas for setting and unsetting the vector font number?
Re: Setting and unsetting the vector font number [message #34707 is a reply to message #34705] Fri, 04 April 2003 06:41 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Kristian Kjaer wrote:
>
> IDL5.6 help says:
> <quote>
> Once the vector font system is selected, use an embedded formatting
> command to select a vector font (or fonts) for each string. (See
> Embedded Formatting Commands for details on embedded formatting
> commands.) The font selected "sticks" from string to string; that is, if
> you change fonts in one string, future strings will use the new font
> until you change it again or exit IDL.
>
> For example, to use the Duplex Roman vector font for the title of a
> plot, you would use a command that looks like this:
>
> PLOT, mydata, TITLE="!5Title of my plot"
> </quote>
>
> So to have all of the lettering in font !5 (including the numbers near
> the tickmarks, etc.) one has to include "!5" in the first string
> processed by IDL in the plot command, and to reset to the default font
> one must end the _last_ string by "!3".
>
> Somewhere I read which this first and last string are, but now I can't
> find it.
> Does anyone remember?
>
> Any other ideas for setting and unsetting the vector font number?

What about the !X command? E.g.

PLOT, mydata, TITLE="!5Title of my plot!X"

?

Doesn't this set the font to #5 and then switch it back to whatever the font was before
the command? I always use !X when I change fonts in a test string, e.g. like when you want
to insert greek letters and such (although that's an easy error to catch since it's all
Greek to me after that :o)

It's an extra "!X" in every string you want to change, but that's a lot easier than trying
to remember to switch it back at one particular spot. (At least I think so)

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
Ph: (301)763-8000 x7748
Fax:(301)763-8545
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Font sizes/Screen vs. Postcript/Contour dropping lables
Next Topic: Apple X11 Beta 0.3

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

Current Time: Wed Oct 08 17:40:39 PDT 2025

Total time taken to generate the page: 0.00387 seconds