Files
BlitzNext/_release/help/commands/2d_commands/FreeFont.htm
T
2014-12-08 12:43:20 +13:00

74 lines
1.9 KiB
HTML

<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>FreeFont fonthandle</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
fonthandle = A handle to a previously loaded font.
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
This removes a TrueType font previously loaded into memory (though the LoadFont command).
<br />
<br />
Note: Blitz doesn't work with SYMBOL fonts, like Webdings and WingDings.
</td>
</tr>
</table>
<h1><a href=../2d_examples/FreeFont.bb>Example</a></h1>
<table>
<tr>
<td>
; LoadFont/SetFont/FreeFont example
<br />
<br />
; enable graphics mode
<br />
Graphics 800,600,16
<br />
<br />
; Set global on font variables
<br />
Global fntArial,fntArialB,fntArialI,fntArialU
<br />
<br />
;Load fonts to a file handle variables
<br />
fntArial=LoadFont("Arial",24,False,False,False)
<br />
fntArialB=LoadFont("Arial",18,True,False,False)
<br />
fntArialI=LoadFont("Arial",32,False,True,False)
<br />
fntArialU=LoadFont("Arial",14,False,False,True)
<br />
<br />
; set the font and print text
<br />
SetFont fntArial
<br />
Text 400,0,"This is just plain Arial 24 point",True,False
<br />
<br />
SetFont fntArialB
<br />
Text 400,30,"This is bold Arial 18 point",True,False
<br />
<br />
SetFont fntArialI
<br />
Text 400,60,"This is italic Arial 32 point",True,False
<br />
<br />
SetFont fntArialU
<br />
Text 400,90,"This is underlined Arial 14 point",True,False
<br />
<br />
; Standard 'wait for ESC' from user
<br />
While Not KeyHit(1)
<br />
Wend
<br />
<br />
; Clear all the fonts from memory!
<br />
FreeFont fntArial
<br />
FreeFont fntArialB
<br />
FreeFont fntArialI
<br />
FreeFont fntArialU
</td>
</tr>
</table>
<br>
<a target=_top href=../index.htm>Index</a><br>
<br>
Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=FreeFont&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
</html>