' Example program by Tom Wilkinson 1994 in Hisoft Basic 2.1
' This code shows how to load, list and select fonts under gdos
' and speedo gdos. The structure isn't the greatest, but at 
' least  you won't have to get the headache I got trying to 
' learn about printing speedo fonts to the screen.

DEFINT a-z
LIBRARY "GEMVDI" 
LIBRARY "SPEEDO"
LIBRARY "GEMAES"

alert1$="[2][This program requires gdos][Cancel|OK]"

REM the following if endif loop just tests for gdos and quits
REM the program if gdos or speedo is not installed

IF(GDOS%)=0 THEN 
	x=FORM_ALERT(1, alert1$)
	STOP
END IF

PRINT "Loading Fonts"
element_num=vst_load_fonts ' load speedo fonts
PRINT "done..."

REM the following routine finds the index number of each loaded
REM font and prints its name, index number and font number

FOR y = 1 TO element_num
x=vqt_name(y,name$)
PRINT "Font Name Is ";name$;" Font Number is ";x;" Element_num= ";y
NEXT y
PRINT
PRINT "Above are the fonts loaded in your system."
PRINT "Press a key to continue" 
a=INP(2)

REM The following stuff clears the screen, sets the font, colour and size
REM and then writes yabadabadoo to the screen

v_clrwk ' clears the screen
vst_font(3000) ' sets font to dutch
vst_color(2) ' sets font colour to red
vst_height(36) 'sets height to 36 points
v_ftext 100,100,"yabadabadoo" 'writes graphic text


