home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ANews 3
/
AnewsCD3.iso
/
DP
/
Programmation
/
PureBasic_Demo
/
Examples
/
Sources
/
Font.pb
< prev
next >
Wrap
Text File
|
1999-10-10
|
1KB
|
48 lines
;
; *******************************************
;
; Font management example file for Pure Basic
;
; © 1999 - Fantaisie Software -
;
; *******************************************
;
;
InitFont(1) ; We will need 2 fonts...
InitWindow(0) ; ... and 1 window
If LoadFont(0,"XHelvetica.font",11) ; Load our font and check if the
Nprint("You're system has the XHelvetica font.") ; font is found or not.
OkXHelvetica = 1 ;
Endif
If LoadFont(1,"topaz.font",8) ; The same for topaz font
Nprint("Topaz font found.") ;
OkTopaz = 1 ;
EndIf
If OpenWindow(0,10,100,200,200,0,0) ; Open our window
SetDrawingOutput(WindowRastPort()) ; 2D Drawing will be done on our window
FrontColour(1)
If OkTopaz ; Display text with the different fonts
DrawingFont(FontID(1)) ;
Locate(20,30) ;
PrintText("Topaz") ;
EndIf ;
;
If OkXHelvetica ;
DrawingFont(FontID(0)) ;
Locate(20,50) ;
PrintText("XHelvetica") ;
Endif ;
MouseWait() ; Wait the user mouse click
Endif
End ; Free all ressources and quit