× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Thu, 18 Dec 2008, Scott Klement wrote:

This is where I experience about a 3 – 5 second wait before the 132
column screen is displayed, but with only 84 columns and 25 rows. The
rest is cut-off.

I run FreeBSD, and have not encountered this symptom. However, I can
explain to you how things work, and maybe that'll give you some ideas of
how to solve the problem.

[Snip very good explanation of the problem]

Have you tried x5250? You might have better luck with that. x5250 is a
true X11 program, it's not a console program running in an xterm. If my
theories are correct, that SHOULD make a big difference.

I experimented with x5250 and while on my system it doesn't exhibit the problematic behaviour described for xt5250 it still doesn't fill the window with content when maximized. That's because x5250 chooses window size based on how much space is required to draw the contents in the font specified. Maximizing simply gives more room to x5250 to draw in. But since it doesn't need that room you just end up with a bunch of blank space along the right and bottom edges of the window (this is the same behaviour I get with xt5250 maximized). Switching from 80 to 132 columns and back is completely free of any problems, but of course it resizes the window to the size it needs and no more. So a maximized window becomes unmaximized (at least it does on my system running WindowMaker).

A nice feature to add to x5250 would be font resizing based on window size. This is a tough problem because of the difficulty of finding an approriate font on the system that fits the dimensions of an arbitrary window. I think that is why IBM iSeries Access snaps windows to specific dimensions and doesn't allow windows of any arbitrary size. I don't even know how to go about finding a list of fonts in X11 that look like that same but are different sizes programmatically. Indeed, there is a chance that appropriate fonts don't even exist beyond a certain range of sizes. The current way fonts are loaded and screen sizes determined goes something like this:

1. look for the font the user specified (either on the command line or in an X11 resource).
2. if found, load that font.
3. determine the maximum width in pixels that would be required to fit 80 or 132 characters in that font on the screen. Do the same for the font height and number of rows.
4. create or resize the window using the found dimensions.

In order for the window content to fill an arbitrary sized window there would have to be some mechanism for finding fonts that when rendered with their widest/tallest character fit the window size. There is probably a way to find a list of fonts (xfontsel shows such a list). Figuring out which of those fonts would fit the required dimensions would be a challenge. I think x5250 would have to load each font and check one by one. Of course you would also want a way to use only fixed width fonts and that might be hard to do.

The entire above discussion is based around using bitmapped fonts. There might be another solution: use scalable fonts. Not all scalable fonts are created equal. More recent X11 apps use pango or some other font rendering library to acheive good looking scalable fonts. I avoided that in x5250 in order to minimize the number of dependancies on other software. But perhaps adding pango support or something like it would be a nice option.

James Rich

if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.