FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

FONTS

Avoid messing up the System font


I have found one of the problems with the system font changing, window titles being messed-up, etc (by narrowing down my buggy code!, notice the plural Staz ;->)

If you run Example One below, it will change the system font for the Finder and everything else! It seems to be because there is no window open when the call is made to "TEXT". Note that this only happens in FB3, as FB2 protects you from such stupidity. The second example will correct the problem, so that you can get back to work.

------- Cut Here For Example One --------
OUTPUT FILE "Change System Font"

DIM gFontNum%
CALL GETFNUM("Chicago", gFontNum%)
TEXT gFontNum%, 10, _outlineBit%

WINDOW 1
END
------- Cut Here For Example Two --------
OUTPUT FILE "Fix System Font"

DIM gFontNum%
CALL GETFNUM("Chicago", gFontNum%)
TEXT gFontNum%, 12, 0,0

WINDOW 1
END
Jamin