Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Dialog Editor Fonts

Keywords:      GUI fonts

Question:

The default font used in constructing dialogs in the Dialog Editor is very different from that used in displaying the dialog, not at all WYSIWIG. I haven't been able to find how to change either one. The display font is fine. You get something that looks ok in the editor and is very different when you run the program. What am I missing?

Answer:

The 97D version of the Dialog editor has a menu item under EDIT (I think) to allow you to switch fonts.

The story is that both Windows and WinBatch are moving to "GUI" fonts. But the old Windows and old WinBatch used different fonts. So there will be some disasters in the conversion process, especially if you have to support both old and new platforms.

Basically for Windows 95 and NT 4.0, the default is GUI fonts. The new dialog editor defaults the same way.

There is an IntControl that can force the old style fonts.

Question (continued):

I encountered the same, and when I looked at it, I discovered that while the default is supposed to be GUI in 97D, I had to explicitly enter IntControl(52,1,0,0,0) into the script for the GUI to work, at least from outside the compiler.

It is almost as if the GUI mode was made the default in the compiler but not in Winbatch.exe in 97D.

Putting the line into the script before the dialog worked.

Answer:

Should work. Check to make sure you don't have an old version of WinBatch involved somehow.

By the way, the Intcontrol(52,... may not be documented in the older versions of the WIL.HLP file. Here's the syntax:



    IntControl(52, p1, 0, 0, 0) (32-bit only)
      Set dialog font.

        P1   Meaning
        --   -------
        -1   Don't change (just return current setting)
	 0   Use standard system font.
	 1   Use GUI font (default).

      This IntControl lets you specify whether the standard system font or
      GUI font is used by dialog boxes created with the Dialog command.	 By
      default, the GUI font is used.

	Note: The GUI font is available only in Windows 95 and Windows NT 4.0.

      Returns previous setting.


Question:

What is the difference between the GUI and the System Font (besides size)? I want to move to using the GUI font but want to make sure that it will not change on different end users terminals. In particular, I want to be sure it won't get truncated or the layout changed on different Windows configurations.

Answer:

The GUI font seems a bit smaller and nicer looking. It varies - like the system font- on a system by system basis. In your video driver setup you can usually choose small or large font. This affects all kinds of things.

The basic rule is don't try to shave stuff too closely. If you are really paranoid about it, look at it in the VGA 640x480 video mode. It usually brings out the worst of problems.

From a layout and editing standpoint, fireup your word processor and type in a paragraph in a monospaced font (system font or courier ) which is usually spaced in cpi (characters per inch). These are also called typewriter fonts because they are the only kind most typewriters can do. Compare that with a proportional font (arial or Times Roman, say), which are measured in points.

You will notice that proportional (GUI) fonts vary the spacing between different leters and words, and the characters are not in vertical strips, as they are with monospaced fonts. You will notice that becasue of the proportional spacing, that more characters fit in a horizontal line than with monospaced fonts, even though the character height of 12 pts is roughly the same as 10 characters per inch. Also, many people, particularly those with dyslexia or other learning differences, have difficulty with monospaced fonts because the spaces between words often tends to look like "rivers" if the paragraph is long enough.

As a basic rule, if you go from system font to gui font of the same point size or equivalent cpi, you will need less width for the proportional font.

The only trouble I have found in converting has been in the case of a dialog() box where I needed to line up radio buttons with non-radio button descriptions (I used variables so that 5 choices were always named, but radio buttons only occured beside some buttons. This did not like gui fonts too much.)


Article ID:   W12842
Filename:   Fonts used in Dialog Editor.txt