parallel sign in postscript output in device fonts (direct graphics) [message #85741] |
Fri, 30 August 2013 02:16  |
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   |
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  |
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.")
|
|
|