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

Home » Public Forums » archive » parallel sign in postscript output in device fonts (direct graphics)
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
parallel sign in postscript output in device fonts (direct graphics) [message #85741] Fri, 30 August 2013 02:16 Go to next message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Hi,

I have been trying to figure out how to output a parallel sign ('||') in postscript device font. In vector fonts, that's easy. I just need to use '!M'+string(35B)+'!X'. However, how to do this in a postscript file with device fonts? I've tried David's unicode method but got a box instead.

http://www.idlcoyote.com/graphics_tips/lesign.php

Frequently I need to use parallel and perpendicular signs in plots. I've figured out how to add perpendicular sign, but not the parallel sign. Could someone please help me here?

Thanks a lot.

Xin Tao
Re: parallel sign in postscript output in device fonts (direct graphics) [message #85748 is a reply to message #85741] Fri, 30 August 2013 06:23 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Xin Tao writes:

> I have been trying to figure out how to output a parallel sign ('||') in postscript device font. In vector fonts, that's easy. I just need to use '!M'+string(35B)+'!X'. However, how to do this in a postscript file with device fonts? I've tried David's unicode method but got a box instead.
>
> http://www.idlcoyote.com/graphics_tips/lesign.php
>
> Frequently I need to use parallel and perpendicular signs in plots. I've figured out how to add perpendicular sign, but not the parallel sign. Could someone please help me here?

If you are getting a box, it is because the font you are using doesn't
support that Unicode symbol. I was successful with these commands:

ps_start
device, set_font='dejavusans', /tt_font
cgerase & cgText, 0.5, 0.5, Align=0.5, /Normal, $
'This is parallel symbol: ' + '!Z(2225)', font=1
ps_end

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: parallel sign in postscript output in device fonts (direct graphics) [message #85762 is a reply to message #85748] Tue, 03 September 2013 17:47 Go to previous message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
Thanks, David.

Best,

Xin Tao

On Friday, August 30, 2013 9:23:57 PM UTC+8, David Fanning wrote:
> Xin Tao writes:
>
>
>
>> I have been trying to figure out how to output a parallel sign ('||') in postscript device font. In vector fonts, that's easy. I just need to use '!M'+string(35B)+'!X'. However, how to do this in a postscript file with device fonts? I've tried David's unicode method but got a box instead.
>
>>
>
>> http://www.idlcoyote.com/graphics_tips/lesign.php
>
>>
>
>> Frequently I need to use parallel and perpendicular signs in plots. I've figured out how to add perpendicular sign, but not the parallel sign. Could someone please help me here?
>
>
>
> If you are getting a box, it is because the font you are using doesn't
>
> support that Unicode symbol. I was successful with these commands:
>
>
>
> ps_start
>
> device, set_font='dejavusans', /tt_font
>
> cgerase & cgText, 0.5, 0.5, Align=0.5, /Normal, $
>
> 'This is parallel symbol: ' + '!Z(2225)', font=1
>
> ps_end
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Question about projection for Google Earth
Next Topic: CgBarPlot with NaNs?

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

Current Time: Wed Oct 08 20:05:01 PDT 2025

Total time taken to generate the page: 0.00508 seconds