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

Home » Public Forums » archive » IDL 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
IDL Fonts [message #51004] Wed, 01 November 2006 11:28 Go to next message
Jared Espley is currently offline  Jared Espley
Messages: 17
Registered: February 2006
Junior Member
Hi all,

I have a few questions that I haven't been able to answer with some
digging around on the web and in the IDL help files so maybe someone
can help. The background on my question is that I'm trying to produce
a "publication" quality plot using IDL and I intend to either make a
.tif from a screen capture using tvread.pro
(http://www.dfanning.com/programs/pswindow.pro) or a color .eps using
postscript output. I'm using IDL 6.2 on Windows XP.

1. Has anyone been able to get True Type fonts (i.e. !p.font=1) to look
ok on the screen? When I use them, they look awful -- even worse than
the default vector fonts I was trying to improve upon. I've seen some
"tricks" about blowing them up 4x times in size, but that's not an
option for me since that size of font won't fit on my plot.

2. Has anyone been able to get device fonts (i..e !p.font=0) to work
correctly with vertical axis labels on the screen? When I use them,
the labels are just letters stacked on top of each other right-side up.
In other words instead of having to turn your head to read them, they
look like this:
L
E
B
A
L

3. Assuming I could get the fonts to work correctly, how do I get
special symbols? For example, using vector fonts, I would type,
"title='!4d!B'" to get little delta B -- how can I do this with the
other font styles?

4. How come when I make sure that my plot size is the same on both the
output window on my monitor and in the postscript output (by using
David Fanning's pswindow.pro
http://www.dfanning.com/programs/pswindow.pro) then I still have to
adjust the positions of my plots, colorbars, etc. to make both outputs
look the same?

5. It appears that the color output of the .eps file I make has very
discrete color levels (about 10 or so) compared to the fairly smooth
continuum I see when I output to a window on the screen. Is this a
fundamental limit of postscript or am I doing something wrong?

Thanks for any help and to all of you that have posted helpful IDL code
on the web.

Jared
Re: IDL Fonts [message #51076 is a reply to message #51004] Thu, 02 November 2006 10:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jared Espley writes:

> In the end, I think we're saying the same thing -- knowing the unicode
> number isn't sufficient. You also have to know something about how the
> particular font and its precise unicode implementation.

Ah, yes, I see what you mean. I believe you are right.

I've thought about adding this whole discussion to the
article. Just so people can see how confusing all of
this can be! :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL Fonts [message #51077 is a reply to message #51004] Thu, 02 November 2006 10:16 Go to previous message
Jared Espley is currently offline  Jared Espley
Messages: 17
Registered: February 2006
Junior Member
David Fanning wrote:
> It is hard to know what that chart means. For example, if
> you look on page two of the document (the actual chart),
> you find that a vertical bar has a Unicode value of 2223
> (not 22A5, which I read as a "flagpole" or something).

Yeah, it's actually that flagpole symbol (a straight vertical line with
a straight horizontal line at the bottom) that I'm going for and not
the vertical "pipe" (e.g. |). In my field, it's often used as a
subscript to indicate the perpendicular components of a vector relative
to some background direction. That fact is largely irrelevant since
our discussion had progressed from the specific to the general.

In the end, I think we're saying the same thing -- knowing the unicode
number isn't sufficient. You also have to know something about how the
particular font and its precise unicode implementation. If you're
feeling energetic you may consider appending something like that to
your discussion at http://dfanning.com/graphics_tips/lesign.html.
Again, many kudos to you for even having such a help page in the first
place. One would have hoped that RSI could have provided sufficient
documentation.

Jared
Re: IDL Fonts [message #51078 is a reply to message #51004] Thu, 02 November 2006 10:16 Go to previous message
Jared Espley is currently offline  Jared Espley
Messages: 17
Registered: February 2006
Junior Member
David Fanning wrote:
> It is hard to know what that chart means. For example, if
> you look on page two of the document (the actual chart),
> you find that a vertical bar has a Unicode value of 2223
> (not 22A5, which I read as a "flagpole" or something).

Yeah, it's actually that flagpole symbol (a straight vertical line with
a straight horizontal line at the bottom) that I'm going for and not
the vertical "pipe" (e.g. |). In my field, it's often used as a
subscript to indicate the perpendicular components of a vector relative
to some background direction. That fact is largely irrelevant since
our discussion had progressed from the specific to the general.

In the end, I think we're saying the same thing -- knowing the unicode
number isn't sufficient. You also have to know something about how the
particular font and its precise unicode implementation. If you're
feeling energetic you may consider appending something like that to
your discussion at http://dfanning.com/graphics_tips/lesign.html.
Again, many kudos to you for even having such a help page in the first
place. One would have hoped that RSI could have provided sufficient
documentation.

Jared



Jared
Re: IDL Fonts [message #51079 is a reply to message #51004] Thu, 02 November 2006 09:58 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <MPG.1fb3d78cbddf33a9989d8c@news.frii.com>,
David Fanning <news@dfanning.com> wrote:

> I have no idea what any of this means! I do notice
> that I can get a vertical bar in my display text
> if I use !z(2223) but it appears as a box in PostScript!
> To get the vertical bar in PostScript I have to use
> !z(007c).
>
> Too weird...

I think the box is the default postscript symbol for "You asked me to display
something here that I don't understand".

Ken Bowman
Re: IDL Fonts [message #51080 is a reply to message #51004] Thu, 02 November 2006 09:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jared Espley writes:

> At risk of being unduly argumentative, I don't think 22A5 is supposed
> to be a box. I got that code from here:
> http://www.unicode.org/charts/PDF/U2200.pdf You'll see which
> perpendicular symbol I'm trying to achieve there. Also, if you use,
> for example, 22A6 you also get a box when using the XP device fonts.

It is hard to know what that chart means. For example, if
you look on page two of the document (the actual chart),
you find that a vertical bar has a Unicode value of 2223
(not 22A5, which I read as a "flagpole" or something).
But if you look on the next page, under Operators, you
see 2223, and indented the value 007C for a "vertical line".

I have no idea what any of this means! I do notice
that I can get a vertical bar in my display text
if I use !z(2223) but it appears as a box in PostScript!
To get the vertical bar in PostScript I have to use
!z(007c).

Too weird...

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL Fonts [message #51082 is a reply to message #51004] Thu, 02 November 2006 08:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jared Espley writes:

> At risk of being unduly argumentative, I don't think 22A5 is supposed
> to be a box. I got that code from here:
> http://www.unicode.org/charts/PDF/U2200.pdf You'll see which
> perpendicular symbol I'm trying to achieve there. Also, if you use,
> for example, 22A6 you also get a box when using the XP device fonts.

I think you need to read the first page of PDF file
you cite, under the topic of "Fonts". They point
out that their chart is "not prescriptive. Considerable
variation is to be expected in actual fonts."

To get the actual Unicode values for a *particular*
font, you have to know something about that font. In
the case I presented, I used the Character Map application
for the Times New Roman font. There, 22A5 is *definitely*
a box. :-)

> Thus, I stick by my assertion that many of the XP device fonts don't
> have the full unicode implementation and thus are less useful for
> specific tasks.

I'm not saying this isn't true. I'm just saying
that I found the perpendicular line in the font I use
day in and day out to have a Unicode value of 007C, and
when I used it like that it worked perfectly. What font
were you trying to use?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: IDL Fonts [message #51083 is a reply to message #51004] Thu, 02 November 2006 08:35 Go to previous message
Jared Espley is currently offline  Jared Espley
Messages: 17
Registered: February 2006
Junior Member
David Fanning wrote:
> Well, I am using the same Windows XP and IDL 6.2 system you
> are, and I find that unicode 22A5 is for a box! The perpendicular
> line is listed as unicode 007C.

At risk of being unduly argumentative, I don't think 22A5 is supposed
to be a box. I got that code from here:
http://www.unicode.org/charts/PDF/U2200.pdf You'll see which
perpendicular symbol I'm trying to achieve there. Also, if you use,
for example, 22A6 you also get a box when using the XP device fonts.

Thus, I stick by my assertion that many of the XP device fonts don't
have the full unicode implementation and thus are less useful for
specific tasks. Fortunately, as I noted I was able to get something
satisfactory with vector fonts.

As usual, thanks for your time.

Jared
Re: IDL Fonts [message #51085 is a reply to message #51004] Thu, 02 November 2006 07:33 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Well, I am using the same Windows XP and IDL 6.2 system you
> are, and I find that unicode 22A5 is for a box! The perpendicular
> line is listed as unicode 007C. This code worked for me.
>
> device, set_font='Times New Roman', /tt_font
> thisDevice = !D.Name
> set_plot, 'ps'
> device, xsize=5, ysize=1, /inches, filename='test.ps', /isolatin1
> xyouts, 0.5, 0.5, /normal, charsize=2, align=0.5, $
> 'Straight bar (!Z(007C)) sign.'
> device, /close
> set_plot, thisDevice

Whoops! That XYOutS command needs a FONT=1 keyword on the
end of it! Sorry.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: printing hexadecimal
Next Topic: Re: an envi question- extracting the pixel values of seveal points with lat-lon values

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

Current Time: Wed Oct 08 13:46:46 PDT 2025

Total time taken to generate the page: 0.00628 seconds