[comp.sys.amiga.tech] Another "fix": this one to Intuition

phil@rice.edu (William LeFebvre) (12/16/88)

Here's another thing I wish they'd fix when revamping stuff for 1.4.  I
believe this is a problem with Intuition.  I wish that menus paid
attention to the font's height.  I would like to run an interlaced
workbench using topaz/11 for a default font, but when I do that the menus
look all wrong.  It is clear that the code that builds the menu is still
assuming that the font only has a height of 8.

Is there a way around this, or am I right in assuming that this is a
genuine bug/problem?

			William LeFebvre
			Department of Computer Science
			Rice University
			<phil@Rice.edu>

scotth@harlie.SGI.COM (Scott Henry) (12/16/88)

From article <2334@kalliope.rice.edu>, by phil@rice.edu (William LeFebvre):
> Here's another thing I wish they'd fix when revamping stuff for 1.4.  I
> believe this is a problem with Intuition.  I wish that menus paid
> attention to the font's height.  I would like to run an interlaced
> workbench using topaz/11 for a default font, but when I do that the menus
> look all wrong.  It is clear that the code that builds the menu is still
> assuming that the font only has a height of 8.
> 
> Is there a way around this, or am I right in assuming that this is a
> genuine bug/problem?
> 
> 			William LeFebvre
> 			Department of Computer Science
> 			Rice University
> 			<phil@Rice.edu>

I would like to know also.
Unfortunately, it isn't only the menus (though they are among the worst
offenders), its also requestors, and windows, not to mention more than 90%
of the utilities and other nifty programs out there! Because several other-
wise usefull utilities (specifically ASDG's Sysmon program) use the default
font and assume that it is 8 pixels high, I fire it off with the default
font left at Topaz/8, then switch to Topaz/11 for my CLI (actually WShell)
window. But, if you activate the Sysmon window (real easy when using DMouse),
the window title goes to Topaz/11! This should be fixed, also.

	Scott Henry
	Silicon Graphics
	<scotth@sgi.com>
--
              Scott Henry <scotth@harlie.sgi.com> {or, also on the Internet:}
                          <skywalker@cup.portal.com>
#include <std_disclaimer.h>

jesup@cbmvax.UUCP (Randell Jesup) (12/16/88)

In article <2334@kalliope.rice.edu> phil@rice.edu (William LeFebvre) writes:
>Here's another thing I wish they'd fix when revamping stuff for 1.4.  I
>believe this is a problem with Intuition.  I wish that menus paid
>attention to the font's height.  I would like to run an interlaced
>workbench using topaz/11 for a default font, but when I do that the menus
>look all wrong.  It is clear that the code that builds the menu is still
>assuming that the font only has a height of 8.
>
>Is there a way around this, or am I right in assuming that this is a
>genuine bug/problem?

	Well, it's not a bug, but it is a problem with the general system
design.

	Intuition doesn't build menus, programs do.  They tell intuition
how high/wide each entry is, and the tell it what {text|image} to display.
For text, they can tell it a font, or (most common) leave it NULL, and it
will use the (screen or window)'s font.  So they say the menu entry is 8
pixels high, and leave font NULL, which doesn't produce pretty results if the
default font isn't 8 high.

	You CAN make a program work with this: when reving Notepad for 1.3,
I put some support for this into the font menus (only), since I was making them
work for most any number of fonts (max is 126 now, I think.)  A font requester
would be better, and we hope to have a standard one for 1.4.

	The way to make the program work is to look at the size of the font,
then calculate the height AND width of the menu items.  (Width should be
equal for all items in a column).  IntuiTextLength is good for width, make sure
font is filled in in the IntuiText structure.  Also, when doing this, you should
think about avoiding running over any of the boundaries of the screen (tends to
kill the system with memory corruption).  If they won't fit in one column, 
use two, etc.  If the menu hangs over the right edge of the screen, move it
left.  If the submenu hits the bottom, have it extend upwards as well as down.
You get the idea.

	With relatively small, static menus this is of less importance,
especially if you don't go anywhere near the edges (right OR bottom).

	Usage of fonts other than 8x8 or 8x9 is important, and you should try
to be ready for it.

	Food for thought...

-- 
You've heard of CATS? Well, I'm a member of DOGS: Developers Of Great Software.
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup