Custom Fonts

Blitz3D Forums/Blitz3D Programming/Custom Fonts

Makepool(Posted 2006) [#1]
How do Blitz fonts work? I assume they use the fonts that are already installed within Windows but what happens if I use a font that does not come with Windows by default, what would happen on other computers? Would the program crash or would blitz simply default to another font?


bytecode77(Posted 2006) [#2]
you can load fonts by
LoadFont("Gfx\Font1.fnt")


but remember, not to use the filename, but the name of the font!


Stevie G(Posted 2006) [#3]
Using a simple test it seems to load a default font, even if the font name is not found. Note that it is not blitz's default text font as you can see by commenting out the font load/set lines.

Stevie

Graphics 640,480,16,1

MyFont= LoadFont( "ThisFontDoesNotExist" )
SetFont MyFont

SetBuffer BackBuffer()

Text 0,10,MyFont
Text 0,20,"This is just a test"

Flip

MouseWait