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

Home » Public Forums » archive » Re: ps/eps ouput from object graphic
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
Re: ps/eps ouput from object graphic [message #48504] Thu, 27 April 2006 17:23
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Thu, 27 Apr 2006 09:44:42 -0600, David Fanning wrote:

> David Fanning writes:
>
>> In 30 minutes of fooling around, the only way I could
>> get an epsilon symbol so far is like this:
>>
>> xobjview,obj_new('IDLgrText',Enable_Formatting=1,'!4' + String(101B), $
>> font=obj_new('idlgrfont', name='hershey'))
>>
>> Something here is not quite right. :-(
>
> Well, progress of sorts. I try this command:
>
> xobjview,obj_new('IDLgrText',font=obj_New('idlgrfont', name='symbol'), $
> enable_formatting=1, "!Z('65'x)")
>
> And I get a nice epsilon symbol along with all sorts of garbage:
>
> IDL> xobjview,obj_new('IDLgrText',font=obj_New('idlgrfont',
> name='symbol'), enable_formatting=1, "!Z('65'x)")
> IDLGRSRCDEST::GETTEXTDIMENSIONS: Select Charmap failure (Encoding:
> 0x756e6963) (FreeType error info: (6) invalid argument).
> IDLGRSRCDEST::GETTEXTDIMENSIONS: Select Charmap failure (Encoding:
> 0x756e6963) (FreeType error info: (6) invalid argument).
> IDLGRSRCDEST::DRAW: Select Charmap failure (Encoding: 0x756e6963)
> (FreeType error info: (6) invalid argument).
> IDLGRSRCDEST::DRAW: Select Charmap failure (Encoding: 0x756e6963)
> (FreeType error info: (6) invalid argument).
>
> Help!

I fixed a bug almost exactly like this back around IDL 6.1. I think that
the only difference was the character code. That bug happened with a
bigger character code (> 255). The Symbol font has been a bit problematic
for us because it is pretty old and doesn't have a Unicode table in it, or
something along those lines. The larger char code caused an access past
the end of the font table. Apparently, the fix made back then took care
of the big char code problem, but IDL still tries to use unicode encoding
to access the symbol font. I'll file a bug report, but your workaround
for the meantime is to avoid using unicode encoding to access the symbol
font, as you seem to have worked out. You shouldn't need unicode to do it
anyway, since the font doesn't have enough glyphs in it to require unicode.

Karl
Re: ps/eps ouput from object graphic [message #48508 is a reply to message #48504] Thu, 27 April 2006 10:19 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Boto writes:

> I have read the article from coyote
> site.(http://www.dfanning.com/ographics_tips/greek.html)
> But I want express a epsilon character so I command like this~
>
> xobjview,obj_new('IDLgrText',Enable_Formatting=1,"!Z('03B5'x) ")
>
> However, it did not work! Just long empty square is shown not a
> charater.
>
> Why does this happen?

Don't know. Maybe it *used* to work that way. I'm not
sure. But there are new instructions now:

http://www.dfanning.com/ographics_tips/greek.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48509 is a reply to message #48508] Thu, 27 April 2006 09:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> (It turns out, incidentally, that the Times font *has*
> a capital omega, but no epsilons!!!!) Weird. How come no one
> told me this? That greek page gets downloaded at least a
> dozen times a day!! Sheesh!

One possible explanation is that this reflects the number
of people who *think* about object graphics verses the
number of people who actually *use* object graphics.
If so, it casts a pall over optimistic forecasts of
IDL's future. I'd bet on it, but I've promised my
wife I'd stop being so cynical all the time. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48510 is a reply to message #48509] Thu, 27 April 2006 09:27 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 the foggiest idea of how or why, but consider
> this:
>
> IDL> str = 'This is the greek symbol epsilon: ' + '!9e!x' + '.'
> IDL> xobjview, obj_new('idlgrtext', str, /enable_formatting)

Ok, so this is equivalent to this:

IDL> str = 'This is the greek symbol epsilon: ' + $
'!9' + string("145b) + '!x'+ '.'
IDL> xobjview, obj_new('idlgrtext', str, /enable_formatting)

In this case, epsilon is represented as the octal value "145B.
I found this value by looking up "true-type font samples" for
the Symbol font in the IDL on-line help. This formulation will
also work for other greek symbols. For example, here is a
capital omega:

IDL> str = 'This is the greek symbol capital omega' $
+ '!9' + string("127b) + '!x' + '.'
IDL> xobjview, obj_new('idlgrtext', str, /enable_formatting)

This will work with *any* Greek symbol. (At least the ones
I've tried.)

Possibly we have the start of some kind of explanation
now. (It turns out, incidentally, that the Times font *has*
a capital omega, but no epsilons!!!!) Weird. How come no one
told me this? That greek page gets downloaded at least a
dozen times a day!! Sheesh!

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48511 is a reply to message #48510] Thu, 27 April 2006 09:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> David Fanning writes:
>
>> In 30 minutes of fooling around, the only way I could
>> get an epsilon symbol so far is like this:
>>
>> xobjview,obj_new('IDLgrText',Enable_Formatting=1,'!4' + String(101B), $
>> font=obj_new('idlgrfont', name='hershey'))
>>
>> Something here is not quite right. :-(
>
> Well, progress of sorts. I try this command:
>
> xobjview,obj_new('IDLgrText',font=obj_New('idlgrfont', name='symbol'), $
> enable_formatting=1, "!Z('65'x)")
>
> And I get a nice epsilon symbol along with all sorts of garbage:

I don't have the foggiest idea of how or why, but consider
this:

IDL> str = 'This is the greek symbol epsilon: ' + '!9e!x' + '.'
IDL> xobjview, obj_new('idlgrtext', str, /enable_formatting)

Go figure....

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48512 is a reply to message #48511] Thu, 27 April 2006 08:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> In 30 minutes of fooling around, the only way I could
> get an epsilon symbol so far is like this:
>
> xobjview,obj_new('IDLgrText',Enable_Formatting=1,'!4' + String(101B), $
> font=obj_new('idlgrfont', name='hershey'))
>
> Something here is not quite right. :-(

Well, progress of sorts. I try this command:

xobjview,obj_new('IDLgrText',font=obj_New('idlgrfont', name='symbol'), $
enable_formatting=1, "!Z('65'x)")

And I get a nice epsilon symbol along with all sorts of garbage:

IDL> xobjview,obj_new('IDLgrText',font=obj_New('idlgrfont',
name='symbol'), enable_formatting=1, "!Z('65'x)")
IDLGRSRCDEST::GETTEXTDIMENSIONS: Select Charmap failure (Encoding:
0x756e6963) (FreeType error info: (6) invalid argument).
IDLGRSRCDEST::GETTEXTDIMENSIONS: Select Charmap failure (Encoding:
0x756e6963) (FreeType error info: (6) invalid argument).
IDLGRSRCDEST::DRAW: Select Charmap failure (Encoding: 0x756e6963)
(FreeType error info: (6) invalid argument).
IDLGRSRCDEST::DRAW: Select Charmap failure (Encoding: 0x756e6963)
(FreeType error info: (6) invalid argument).

Help!

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48513 is a reply to message #48512] Thu, 27 April 2006 08:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Tupper writes:

> Well, there you go! Proof is in the pudding!

Shoot! I was hoping you would tell me it "works fine
on my Macintosh". Then we could blame the problem on
Microsoft and be done with it. Now we are going to
have to get to the bottom of it. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48515 is a reply to message #48513] Thu, 27 April 2006 07:58 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
David Fanning wrote:
> Ben Tupper writes:
>
>
>> It's objects all the way down. By not specifying the font you accepted
>> the the default - to do the symbol stuff you need more vectory fonts
>> like Hershey (which is the default for Direct Graphics.)
>>
>> xobjview,obj_new('IDLgrText',Enable_Formatting=1,"!Z('03B5'x) ", $
>> font = obj_new('IDLgrFont', 'Hershey'))
>
>
> Well, on my computer this gives me a nice big MU symbol!!
>

> Ben Tupper writes:
> You have to read the whole article to avoid this error.
> (Don't you hate it when this happens - I'll bet you read
> the rest of the article just after hitting the send button.
> I do that waaay too often. Ready! Fire! Aim!)

Well, there you go! Proof is in the pudding!

Anywho, it is all greek to me.

Ben
Re: ps/eps ouput from object graphic [message #48517 is a reply to message #48515] Thu, 27 April 2006 07:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Tupper writes:

> It's objects all the way down. By not specifying the font you accepted
> the the default - to do the symbol stuff you need more vectory fonts
> like Hershey (which is the default for Direct Graphics.)
>
> xobjview,obj_new('IDLgrText',Enable_Formatting=1,"!Z('03B5'x) ", $
> font = obj_new('IDLgrFont', 'Hershey'))

Well, on my computer this gives me a nice big MU symbol!!

I really don't know what is going on. Karl!?

Is it possible in my article that I used the one and
only symbol this actually works for? That seems unlikely,
and yet....

In 30 minutes of fooling around, the only way I could
get an epsilon symbol so far is like this:

xobjview,obj_new('IDLgrText',Enable_Formatting=1,'!4' + String(101B), $
font=obj_new('idlgrfont', name='hershey'))

Something here is not quite right. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: ps/eps ouput from object graphic [message #48518 is a reply to message #48517] Thu, 27 April 2006 06:58 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Boto wrote:
> Thanks Ben~~!
> I have another question.
>
> I have read the article from coyote
> site.(http://www.dfanning.com/ographics_tips/greek.html)
> But I want express a epsilon character so I command like this~
>
> xobjview,obj_new('IDLgrText',Enable_Formatting=1,"!Z('03B5'x) ")
>
> However, it did not work! Just long empty square is shown not a
> charater.
>
> Why does this happen?
>
> How can I avoid this error?
>

Hi,

You have to read the whole article to avoid this error. (Don't you hate
it when this happens - I'll bet you read the rest of the article just
after hitting the send button. I do that waaay too often. Ready! Fire!
Aim!)

It's objects all the way down. By not specifying the font you accepted
the the default - to do the symbol stuff you need more vectory fonts
like Hershey (which is the default for Direct Graphics.)

xobjview,obj_new('IDLgrText',Enable_Formatting=1,"!Z('03B5'x) ", $
font = obj_new('IDLgrFont', 'Hershey'))

If you are digging to OG I recommend Ronn Kling's "Power Graphics with
IDL". www.rlkling.com

Cheers,
Ben
Re: ps/eps ouput from object graphic [message #48519 is a reply to message #48518] Thu, 27 April 2006 06:01 Go to previous message
snfinder@naver.com is currently offline  snfinder@naver.com
Messages: 35
Registered: August 2005
Member
Thanks Ben~~!
I have another question.

I have read the article from coyote
site.(http://www.dfanning.com/ographics_tips/greek.html)
But I want express a epsilon character so I command like this~

xobjview,obj_new('IDLgrText',Enable_Formatting=1,"!Z('03B5'x) ")

However, it did not work! Just long empty square is shown not a
charater.

Why does this happen?

How can I avoid this error?

Thank you~
May you be happy~
Re: ps/eps ouput from object graphic [message #48521 is a reply to message #48519] Thu, 27 April 2006 05:37 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Boto wrote:
> Hi all~ ;-)
>
> I'm newbie in IDL.
> Theseday, I'm trying to learn object graphics of IDL. I plot many
> spheres by means of orb object. But I can't save it to the ps file
> because there is only menu that enables to save image files such as
> bmp,jpg, etc. How can I save it to ps file?
>

Hi,

Try searching Google Groups for this newsgroup. Here is what popped up
for me http://tinyurl.com/p9oxo when I searched for...

postscript and "object graphics"

Cheers,
Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ps/eps ouput from object graphic
Next Topic: Saving the IDL terminal datastream

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

Current Time: Wed Oct 08 15:14:38 PDT 2025

Total time taken to generate the page: 0.00749 seconds