[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: widget_programming

R.Bauer (R.Bauer@fz-juelich.de) writes:

> position keywords are fine if I use always the same platform for my
> application.
> But unfortunately we have some computers and some platforms where
> positional widgets are shown very bad.
> The main reason is the different system font and the different screen
> resolutions.
> Which fonts are on unix idl and nt idl will give the same results? Is
> there a list avaliable?
> Did the fontsize append on the screen resolution and how will I get
> independent to the screen resolution?
> I do understand well thats if I defined 1280 * 1024 and I have on an
> other one  only 1024 x 768 I got in trouble.
> But if I define 200 * 160 both should look simliar. What happens is
> thats on the best system (it's always the one where the widget was
> builded) all is ok and on an other one all is shifted on top of each
> other. Input fields could not be reached.

Welcome to the world of cross-platform compatibility, Reimar!
You haven't been reading those IDL marketing materials 
again, have you? :-)

Here is the bottom line: things ARE different between
platforms. And writing programs that work everywhere 
is more work than you may have been lead to believe.
Both for you and for the software engineers at RSI.

So, I'm going to take a huge stab in the dark and 
guess that one of those machines you are trying to
run this program on is an SGI. Because, I've got to
tell you, those machines illicit a huge groan from
me whenever I hear that my programs have to run on
them. They have a HUGE default font size. Sun fonts,
on the other hand, are apparently sized for 18 year
old kids with perfect eyes. I'm certain there isn't
a middle-aged engineer in the Sun building. 

(Actually, I hear that once you reach 40 you are
assigned to write man pages, down in the basement.
That's why they are so bad. The eyesight of everyone
down there has deteriorated so much from staring at
Sum terminals that they can't see what they are writing.)

What can be done about it?

Write letters to Scott McNeeley. ... Oh, you mean
what can be done about font sizes?

Well, I often try to force the character size into
something reasonable, by doing something like this:

   Device, Set_Character_Size=[9,12]

That often helps, especially on those SGIs. But I've
also done more fiddling around than you would like to 
believe, trying to find appropriate fonts from the 
fonts that are installed on the machine (*wherever* 
they are installed, it's often machine-dependent, too).

Perhaps this article will generate some other ideas
we can use. I'll collect them and post them on my
web page. My main problem is that I don't have all these
machines, so when a problem develops I solve it and
forget to write the solution down. :-(

(I'm also vaguely remembering a Mark Rivers function
that helped get nice fonts in a machine-independent
fashion. Mark, are you reading. Haven't heard from
you in a while.)

As to sizing text widgets, I once did a survey of 
the 10 best IDL programmers I knew and asked them how 
they sized text widgets in their programs. I got 10
VERY different answers. But the thing was, the answers
were so *weird*, really bordering on voodoo in most
cases, that I was embarrassed to ever publish the
results. One of the most successful involved some
sort of incantation involving the !D.Y_PX_CM
keyword as I recall. Y!?

I've tried various incantations, too. But lately
I'm been leaning toward fixed screen sizes for
text widgets and forcing smaller font sizes for
the fonts I use. It works pretty well, but not
as well as choosing clients who use PCs. :-)


David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155