| |
FontsYou can print to the screen with PRINT "some text" but it will produce very dull
displays. It is much better to use gPrint, which enables
you to set such things as the font, size, style and so
on. It's easy to use, but fiddly and involves a lot more
typing. However, the results are worth it.
It is hard to visualise
what a particular font looks like and how big it will
appear on the screen. Is 10 point Arial readable or would
you be better with 13 point bold and double height? Would
Times Bold look better?
This simple little program
shows how to print text in different fonts, sizes and
styles. I use it to find a nice type style for headings,
a readable size for a help screen and so on. The
Const.oph file contains lots of font definitions and
using Include you can use them in your program.
A typical example is gFont KFontArialBold13&. Try changing the 13 to 8, 9, 10,
11, 12 and so on. Make a mental note of what works and
what looks nice. Also try KFontArialNormal13& and other variations.
gStyle sets the style - normal, bold,
underlined, inverse, double height, mono spaced, italic
(0, 1, 2, 4, 8, 16, 32). You can add the values to get
bold italic (1+32).
INCLUDE "Const.oph"
PROC Fonts:
defaultwin 1
gAT 120,50
gSTYLE 1
gFONT KFontArialBold13&
gPRINT "Arial 13"
gAT 120,80
gSTYLE 4+32 Rem Inverse+italic
gFONT KFontArialNormal15&
gPRINT "Arial 15"
gAT 120,120
gSTYLE 1+8 Rem Bold+double height
gFONT KFontTimesNormal11&
gPRINT "Times New Roman 11"
GET
ENDP
|