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

Home » Public Forums » archive » Re: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning
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: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning [message #61274] Mon, 14 July 2008 06:56 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Justus Skorps writes:

> I just tried to use the colorbuttonbitmap tool in a program and got a
> problem with it:
>
> I am working on an Solaris system and normally, when I enter
>
> Device, get_current_font=font
>
> I get an empty string as answer. But after using the
> colorbuttonbitmap.pro another value is set ('-dt-interface system-
> medium-r-normal-m sans-17-170-72-72-p-97-iso8859-1') and I cannot
> reset the font. Trying to enter the empty string with
>
> Device, set_font=''
>
> does not work. The problem is now that any letters as marks, titles...
> have an different size depending if the colorbuttonbitmap function has
> been used or not. After using the function I have to quit IDL and
> start it again, a simple reset does not work, to get the normal font
> size back.
>
> Anyone has a solution for this problem?

As far as I can tell, fonts are totally screwed up in IDL. :-)

Or, to be fair, fonts are totally screwed up, generally.
I can't imagine it is an easy job to get things to work
correctly across different platforms. Perhaps we should be
happy that fonts work as well as they do.

But, clearly, there are two different kinds of "default"
hardware fonts: the kind you put on buttons, and the kind
you write out with XYOUTS when you set FONT=0. And, as far
as I can tell, DEVICE, GET_CURRENT_FONT=defaultFont returns
neither of them. :-)

So, if I run the ColorButtonBitmap function, then run another
application I am currently working on, all of my "hardware" fonts
are now too small and too thin. I can restore the right "look"
for my application (on my Windows machine) by typing this line
before I run it:

DEVICE, SET_FONT='Helvetica*16*bold'

I should mention that DEVICE, GET_CURRENT_FONT=defaultFont
returns (quite helpfully) "TIMES" after I issue the command
above. Go figure!

I found the right font for restoring the correct look to my
application by 30 minutes of trial and error. I would guess
on your UNIX machine, it might take an hour and a half or so.
(If you figure it out, let me know, it is sure to come in handy
some day.)

I guess the take-home message in all this is to never, ever,
under any circumstances, change the font with DEVICE, SET_FONT=xxx
or you are going to be forever regretting it. Or, if not regretting
it, forever at a loss as to how to get it back to what it used to
be. Think of it as part of the price you pay to work with cutting
edge 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: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning [message #61278 is a reply to message #61274] Mon, 14 July 2008 04:18 Go to previous messageGo to next message
Justus Skorps is currently offline  Justus Skorps
Messages: 20
Registered: April 2007
Junior Member
I forgot: The problem occurs with IDL 7.0 on Solaris and with IDL 6.3
on WinXP
Re: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning [message #61369 is a reply to message #61274] Mon, 14 July 2008 08:01 Go to previous messageGo to next message
Justus Skorps is currently offline  Justus Skorps
Messages: 20
Registered: April 2007
Junior Member
On 14 Jul., 15:56, David Fanning <n...@dfanning.com> wrote:
>
> As far as I can tell, fonts are totally screwed up in IDL. :-)
>
Fonts are not the only thing totally screwed up in IDL...just look at
the 'where' command...


> So, if I run the ColorButtonBitmap function, then run another
> application I am currently working on, all of my "hardware" fonts
> are now too small and too thin.

Same for me if working in Windows, but on Solaris the font is larger
after the use of colorbuttonbitmap..and my program should work on both
systems :(


> Think of it as part of the price you pay to work with cutting
> edge software. :^)

To be honest: Imho IDL is the biggest pain-in-the-ass high-cost
software I ever worked with...perhaps despite Windows ;c)
I try to avoid using it as far as I can, but unfortunatly it is the
standard software at our institute..I really would like to know who is
responsible for that decision...


But thanks for your answer anyway.
Justus
Re: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning [message #61419 is a reply to message #61369] Tue, 15 July 2008 12:21 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
> Fonts are not the only thing totally screwed up in IDL...just look at
> the 'where' command...

I'm just curious... what about WHERE do you find screwed up? In my
experience, it always behaves very predictably!

-Jeremy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: centering dialog_pickfile, printersetup, etc...
Next Topic: Where O Where Di My Pointer Go?

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

Current Time: Fri Oct 10 14:06:24 PDT 2025

Total time taken to generate the page: 0.00839 seconds