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

Home » Public Forums » archive » Re: Conundrum
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: Conundrum [message #11638] Thu, 21 May 1998 00:00
dlhopols is currently offline  dlhopols
Messages: 10
Registered: April 1998
Junior Member
In article <mgs-1905982035520001@sc3-12-138.thegrid.net>,
mgs@sd.cybernex.net (Mike Schienle) wrote:

> And if your requirements don't allow leaving it up to the user you can set
> up a list of fonts that you can use throughout your applications. I have a
> couple functions that manage fonts for me. I will add them to my web site
> tonight (5/19/98) since they're a little too long to post here.
I have a question as well as a comment on fonts.
I've tried Mike's FontGen program which I found on his Web
page. Since I am learning widgets, I tried to use it to provide a
widget list of fonts (SGI Unix). When one font is chosen from this list, a
second widget appears which has a label with the specified font. This
actually worked quite well except that some fonts are not found by my SGI.
Specifically, the bold Greek. I get an error message (at the command line)
when I choose this font from my widget list. The widget label has the IDL
default with no mention of any error.
My question is: How can I intercept this message from the
Widget_Label error handling so that it can print out that I have an
error (by printing the error message inside the widget label) rather than just
giving me a value which I do not want?

The IDL manual says that using DEVICE obtains only hardware Font definitions.
I can only think of using a plot routine, check if an error occurs, and
then proceed accordingly with a DIALOG_MESSAGE. But can I bypass this
plot part? (Maybe this is related to the window popping up which was
mentioned earlier in this thread. )

Rose


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
Re: Conundrum [message #11653 is a reply to message #11638] Tue, 19 May 1998 00:00 Go to previous message
mgs is currently offline  mgs
Messages: 144
Registered: March 1995
Senior Member
In article <3561ED2F.7564AC8B@astrosun.tn.cornell.edu>, "J.D. Smith"
<jdsmith@astrosun.tn.cornell.edu> wrote:

> David Fanning wrote:
>>
>> J.D. Smith (jdsmith@astrosun.tn.cornell.edu) writes:
...
>>> Thoughts on general cross-platform font selection schemes for
>>> widget fonts (not graphics fonts)?
>>
>> Uh, let the end user worry about widget fonts. They are
>> going to change it anyway (or *can*, which often amounts
>> to the same thing), no matter what you choose. :-)
>>
>> Cheers,
>>
>> David
>>
>
> Sounds good to me. I thought something like that... what I wonder is
> why doesn't it open and free a pixmap, rather than a real window by
> default. In anycase, if I have an open pixmap window, it will work just
> fine. My problem with widget fonts is, e.g. for display of formatted
> text. Non-uniform spacing fonts are very rude. I should probably try
> to implement things in a table widget or something, but what a lot of
> overhead just to show some columns of data!

And if your requirements don't allow leaving it up to the user you can set
up a list of fonts that you can use throughout your applications. I have a
couple functions that manage fonts for me. I will add them to my web site
tonight (5/19/98) since they're a little too long to post here.

--
Mike Schienle Interactive Visuals
mgs@sd.cybernex.net http://ww2.sd.cybernex.net/~mgs/
Re: Conundrum [message #11655 is a reply to message #11653] Tue, 19 May 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
J.D. Smith (jdsmith@astrosun.tn.cornell.edu) writes:

> My problem with widget fonts is, e.g. for display of formatted
> text. Non-uniform spacing fonts are very rude. I should probably try
> to implement things in a table widget or something, but what a lot of
> overhead just to show some columns of data!

Amen to that! (And have you used the table widget? Yuck!)
I keep hoping that the new True-Type fonts in IDL 5.1
(!P.Font=1) will help, but I haven't tried them as
widget fonts yet and don't even know if it is possible
to make them work this way. Courier is usually found on
all systems, but *finding* it is often a problem. The only
solution, really, is test, test, test on the systems you
expect to run on. And then be ready for the unexpected. :-)

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Conundrum [message #11656 is a reply to message #11653] Tue, 19 May 1998 00:00 Go to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
David Fanning wrote:
>
> J.D. Smith (jdsmith@astrosun.tn.cornell.edu) writes:
>
>> Any ideas why the command:
>>
>> device,get_fontnames=df,font='*cour*bold-r-normal*--14*'
>>
>> causes a graphics window to open if one isn't yet? Any way around
>> this?
>
> I'm taking a stab in the dark. I suspect because there has
> to be some kind of connection to the X display system to
> get the fonts and that connection (e.g. choosing a visual
> class) is not made until a graphics window is open in an
> X environment. I'd try making a pixmap before I issued the
> command to see if my thinking is correct.
>
>> Thoughts on general cross-platform font selection schemes for
>> widget fonts (not graphics fonts)?
>
> Uh, let the end user worry about widget fonts. They are
> going to change it anyway (or *can*, which often amounts
> to the same thing), no matter what you choose. :-)
>
> Cheers,
>
> David
>

Sounds good to me. I thought something like that... what I wonder is
why doesn't it open and free a pixmap, rather than a real window by
default. In anycase, if I have an open pixmap window, it will work just
fine. My problem with widget fonts is, e.g. for display of formatted
text. Non-uniform spacing fonts are very rude. I should probably try
to implement things in a table widget or something, but what a lot of
overhead just to show some columns of data!

JD

--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-4083
206 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
Re: Conundrum [message #11657 is a reply to message #11653] Tue, 19 May 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
J.D. Smith (jdsmith@astrosun.tn.cornell.edu) writes:

> Any ideas why the command:
>
> device,get_fontnames=df,font='*cour*bold-r-normal*--14*'
>
> causes a graphics window to open if one isn't yet? Any way around
> this?

I'm taking a stab in the dark. I suspect because there has
to be some kind of connection to the X display system to
get the fonts and that connection (e.g. choosing a visual
class) is not made until a graphics window is open in an
X environment. I'd try making a pixmap before I issued the
command to see if my thinking is correct.

> Thoughts on general cross-platform font selection schemes for
> widget fonts (not graphics fonts)?

Uh, let the end user worry about widget fonts. They are
going to change it anyway (or *can*, which often amounts
to the same thing), no matter what you choose. :-)

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Euclidean distance
Next Topic: SPOT formats

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

Current Time: Wed Oct 08 15:16:51 PDT 2025

Total time taken to generate the page: 0.00676 seconds