| Re: Font Encoding Problem [message #21334] |
Mon, 21 August 2000 15:37 |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"Martin Schultz" <martin.schultz@dkrz.de> wrote in message
news:39A0EC0F.9DC96480@dkrz.de...
> Mark Hadfield wrote:
>>
>> Having made sure you have the right font selected and that formatting
>> commands are enabled, etc, represent the percent sign with !Z(2030).
>>
> ... but doesn't seem to work for Linux
> xyouts,0.5,0.5,'!Z(2030)',/NORM
> only put out a zero.
Well, to make it work you must ensure that an appropriate
Unicode-supporting, Truetype font is selected. I don't think the fonts
bundled with IDL (Helvetica, etc) support Unicode. This page...
http://www.hclrss.demon.co.uk/unicode/fonts.html
...lists various Unicode fonts. Quite a few of the fonts bundled with recent
versions of Windows (Arial, Times New Roman, etc) support a subset of the
full Unicode glyph set called WGL4. To use them with IDL I *think* you just
need to get a copy of the font file and put it in the right place. There are
a couple of links on the above page that deals with Linux, Unix and X11
issues--I do not know what relevance they have to IDL on Linux/Unix.
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
|
|
|
|
| Re: Font Encoding Problem [message #21342 is a reply to message #21334] |
Mon, 21 August 2000 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Mark Hadfield wrote:
>
> "David Fanning" <davidf@dfanning.com> wrote in message
> news:MPG.140773c4312406f8989be4@news.frii.com...
>> I'm trying to figure out how to produce not a percent sign (o/o),
>> but a perthousand sign (o/oo) in IDL. I can find the character
>> on my computer. It has a Unicode of 2030 in the Times New Roman
>> true-type font I have on my computer.
>>
>> Any ideas on how I can convert this into something I can display
>> on an IDL plot?
>
> Having made sure you have the right font selected and that formatting
> commands are enabled, etc, represent the percent sign with !Z(2030).
>
> The !Z format code *is* described in the documentation--that's where I
> stumbled on it--but right now I can't find it again. Anyway, its use is
> pretty straightforward.
>
> [...][/color]
... but doesn't seem to work for Linux ;-(
xyouts,0.5,0.5,'!Z(2030)',/NORM
only put out a zero.
Good news is: I found it easily in the online help (although not
with any keyword that seems related to the question): Go for
Hershey, then click through "About Vector Fonts", "Embedded
Formatting Commands" and scroll down. There's a table giving you
what you ask for. Maybe RSI should offer a new product: the docu
miner ;-)
Cheers,
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie
[[
[[ Bundesstr. 55, 20146 Hamburg
[[
[[ phone: +49 40 41173-308
[[
[[ fax: +49 40 41173-298
[[
[[ martin.schultz@dkrz.de
[[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|
|
| Re: Font Encoding Problem [message #21344 is a reply to message #21342] |
Sun, 20 August 2000 15:03  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.140773c4312406f8989be4@news.frii.com...
> I'm trying to figure out how to produce not a percent sign (o/o),
> but a perthousand sign (o/oo) in IDL. I can find the character
> on my computer. It has a Unicode of 2030 in the Times New Roman
> true-type font I have on my computer.
>
> Any ideas on how I can convert this into something I can display
> on an IDL plot?
Having made sure you have the right font selected and that formatting
commands are enabled, etc, represent the percent sign with !Z(2030).
The !Z format code *is* described in the documentation--that's where I
stumbled on it--but right now I can't find it again. Anyway, its use is
pretty straightforward.
> What is the Unicode, anyway!?
Roughly speaking--Unicode gurus may want to elaborate--a system for
displaying almost a vast range of standard characters using 16-bit integers.
The key thing to remember about Unicode is that you don't switch fonts to
display special characters. Instead all the characters are represented (or
at least space is reserved for them) in each font. Few fonts support the
whole Unicode character set, but a subset called WGL4 is widely supported.
See:
http://www.unicode.org/
http://www.hclrss.demon.co.uk/unicode/
The latter has a list of Unicode-enabled fonts for different platforms.
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
|
|
|
|
| Re: Font Encoding Problem [message #21345 is a reply to message #21344] |
Sun, 20 August 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Mark Hadfield (m.hadfield@niwa.cri.nz) writes:
> The !Z format code *is* described in the documentation--that's where I
> stumbled on it--but right now I can't find it again. Anyway, its use is
> pretty straightforward.
That !Z thing was the piece of the puzzle I was missing.
I couldn't find it in the documentation either, but
then I only spent about an hour looking. :-)
Cheers,
David
--
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
|
|
|
|