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 
Return to the default flat view 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 previous 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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
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 06:58:42 PDT 2025

Total time taken to generate the page: 1.11787 seconds