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

Home » Public Forums » archive » symbol font not expoting correctly to EPS from iplot in OSX
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
symbol font not expoting correctly to EPS from iplot in OSX [message #71295] Wed, 09 June 2010 03:34 Go to next message
Luis Alonso is currently offline  Luis Alonso
Messages: 27
Registered: February 2000
Junior Member
Hi,
i'm generating a bunch of graphs in which the title includes greek
symbols (using the !9 + !X way).
They show correctly, but when i export to EPS in vector format the
greek symbols appear empty. However, if i open the file with inkscape
(a vector illustration editing program) i can select and change the
type and the text is there.

This behavior seems to happen only under OSX (my version is Snow
Leopard), it also happens with different versions of IDL (i've tryed
6.3 and 7.0).

My guess is that there is some kind of font conflict, but don't know
how to solve it.

Any hints?

by the way, I'd also like to know how can i programmatically export
the iplot to EPS in VECTOR form. I just found how to do it in bitmap
(which incomprehensibly is the default format).

Thank you in advance for the response!

Luis Alonso

Earth Observation Laboratory
University of Valencia
Re: symbol font not expoting correctly to EPS from iplot in OSX [message #71326 is a reply to message #71295] Tue, 15 June 2010 11:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Karl writes:

> I'm a bit fuzzy on this, but I seem to recall that the Symbol font was
> a bit of an "oddball" in that it did not include any Unicode-to-glyph
> translation tables. That is, it could only handle ASCII 7-bit
> character encodings. Anyway, there was certainly something less
> capable about this particular font, compared to the others.

Yes, this is exactly the problem. The Symbol font present on
almost all computers does not support Unicode values. But
Apple decided in MacOS 10.1 to a supply a Symbol font that
*does* use Unicode values, thus breaking all the code previously
written in the world that takes advantage of Symbol fonts. :-)

I have a program that can return Unicode values for Greek
letters (which presumably would work in any font that supported
such characters), but I have had no luck wrapping the Unicode
characters in the Symbol font for Mac computers. Presumably
because I don't have one to experiment with. Or maybe because
Apple is perverse enough to make it impossible to access without
writing an Apple App with the proper software. ;-)

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: symbol font not expoting correctly to EPS from iplot in OSX [message #71327 is a reply to message #71295] Tue, 15 June 2010 11:20 Go to previous message
Karl[1] is currently offline  Karl[1]
Messages: 79
Registered: October 2005
Member
On Jun 15, 11:42 am, David Fanning <n...@dfanning.com> wrote:
> mgalloy writes:
>> I get the some result:
>
>>   http://michaelgalloy.com/wp-content/uploads/2010/06/greek.ps
>
>> The code I used:
>
>> IDL> set_plot, 'ps'
>> IDL> device, filename='greek.ps'
>> IDL> XYOuts, 0.5, 0.5, /Normal, Align=0.5, 'Greek Letter Zeta ' +
>> Greek('Zeta', /UNICODE), Font=1
>> % Compiled module: GREEK.
>> IDL> device, /close
>> IDL> set_plot, 'x'
>
> OK, now I'm totally confused. :-)
>
> Just one more test, if you don't mind. I presume you might
> get the right symbol if you DON'T use the UNICODE keyword.
> Which would probably mean you are using the "normal" Symbol
> font. Perhaps the one that comes with IDL. Humm. Maybe
> to get the Apple Symbol font you have to use FONT=0.
>
> Just don't know. Too much confusion. Why do you suppose
> Apple would do this? They are acting more and more like
> Microsoft by the day. :-)
>
> 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.")

I'm a bit fuzzy on this, but I seem to recall that the Symbol font was
a bit of an "oddball" in that it did not include any Unicode-to-glyph
translation tables. That is, it could only handle ASCII 7-bit
character encodings. Anyway, there was certainly something less
capable about this particular font, compared to the others.
Re: symbol font not expoting correctly to EPS from iplot in OSX [message #71328 is a reply to message #71295] Tue, 15 June 2010 10:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mgalloy writes:

> I get the some result:
>
> http://michaelgalloy.com/wp-content/uploads/2010/06/greek.ps
>
> The code I used:
>
> IDL> set_plot, 'ps'
> IDL> device, filename='greek.ps'
> IDL> XYOuts, 0.5, 0.5, /Normal, Align=0.5, 'Greek Letter Zeta ' +
> Greek('Zeta', /UNICODE), Font=1
> % Compiled module: GREEK.
> IDL> device, /close
> IDL> set_plot, 'x'

OK, now I'm totally confused. :-)

Just one more test, if you don't mind. I presume you might
get the right symbol if you DON'T use the UNICODE keyword.
Which would probably mean you are using the "normal" Symbol
font. Perhaps the one that comes with IDL. Humm. Maybe
to get the Apple Symbol font you have to use FONT=0.

Just don't know. Too much confusion. Why do you suppose
Apple would do this? They are acting more and more like
Microsoft by the day. :-)

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: symbol font not expoting correctly to EPS from iplot in OSX [message #71329 is a reply to message #71295] Tue, 15 June 2010 08:51 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/15/10 9:35 AM, David Fanning wrote:
> mgalloy writes:
>
>> Did not work for me:
>>
>> http://michaelgalloy.com/wp-content/uploads/2010/06/greek.pn g
>>
>> Do I need to do some setup before I run the line above?
>
> No, but it is not clear to me if the Apple Symbol
> font is strictly a PostScript font or if it is a
> display font, too. I am treating it as if it were
> both.
>
> I guess I'm just going to have to go find a Mac
> somewhere. Too many variables. :-)
>
> Thanks for your help.
>
> Cheers,
>
> David
>
> P.S. Could you check to see if that line works as PostScript
> output? Thanks!

I get the some result:

http://michaelgalloy.com/wp-content/uploads/2010/06/greek.ps

The code I used:

IDL> set_plot, 'ps'
IDL> device, filename='greek.ps'
IDL> XYOuts, 0.5, 0.5, /Normal, Align=0.5, 'Greek Letter Zeta ' +
Greek('Zeta', /UNICODE), Font=1
% Compiled module: GREEK.
IDL> device, /close
IDL> set_plot, 'x'

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
Re: symbol font not expoting correctly to EPS from iplot in OSX [message #71330 is a reply to message #71295] Tue, 15 June 2010 08:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mgalloy writes:

> Did not work for me:
>
> http://michaelgalloy.com/wp-content/uploads/2010/06/greek.pn g
>
> Do I need to do some setup before I run the line above?

No, but it is not clear to me if the Apple Symbol
font is strictly a PostScript font or if it is a
display font, too. I am treating it as if it were
both.

I guess I'm just going to have to go find a Mac
somewhere. Too many variables. :-)

Thanks for your help.

Cheers,

David

P.S. Could you check to see if that line works as PostScript
output? Thanks!



--
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: symbol font not expoting correctly to EPS from iplot in OSX [message #71331 is a reply to message #71295] Tue, 15 June 2010 08:30 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/15/10 8:30 AM, David Fanning wrote:
> David Fanning writes:
>
>> I don't have a Mac, but if someone wanted to help
>> me out, I've put a new version of my Greek program
>> here:
>>
>> http://www.dfanning.com/misc/greek.pro
>>
>> If you set the UNICODE keyword, the program will now
>> return the unicode value for the Greek letter used in
>> the Apple Symbol font distributed with MacOSX 10.1
>> and higher. This *should* allow Macs to produce
>> PostScript output with Greek symbols correctly.
>>
>> IDL> XYOuts, 0.5, 0.5, /Normal, Align=0.5, $
>> 'Greek Letter Zeta ' + Greek('Zeta', /UNICODE), Font=1
>
> Humm. No one with a Mac interested in this?
>
> OK, I'll move on to other things. :-)

Did not work for me:

http://michaelgalloy.com/wp-content/uploads/2010/06/greek.pn g

Do I need to do some setup before I run the line above?

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
Re: symbol font not expoting correctly to EPS from iplot in OSX [message #71332 is a reply to message #71295] Tue, 15 June 2010 07:30 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I don't have a Mac, but if someone wanted to help
> me out, I've put a new version of my Greek program
> here:
>
> http://www.dfanning.com/misc/greek.pro
>
> If you set the UNICODE keyword, the program will now
> return the unicode value for the Greek letter used in
> the Apple Symbol font distributed with MacOSX 10.1
> and higher. This *should* allow Macs to produce
> PostScript output with Greek symbols correctly.
>
> IDL> XYOuts, 0.5, 0.5, /Normal, Align=0.5, $
> 'Greek Letter Zeta ' + Greek('Zeta', /UNICODE), Font=1

Humm. No one with a Mac interested in this?

OK, I'll move on to other things. :-)

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: % POLY_FIT: Warning: Invert detected a small pivot element - help needed
Next Topic: Re: HISTOGRAM data type bug?

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

Current Time: Wed Oct 08 17:46:53 PDT 2025

Total time taken to generate the page: 0.00620 seconds