Include font

BlitzMax Forums/BlitzMax Beginners Area/Include font

Big_Dave(Posted 2005) [#1]
Hi,

I use a different font and currently have it in the game's font folder. It works fine with the following code:
Global newfont=LoadImageFont("Fonts/davesfont.ttf", 20)
SetImageFont(newfont)
 

The font has been declared OK for non-commercial use. Is there anyway of using incbin with the font rather than distributing the ttf file with the game?

I tried the following which didnt work:
incbin "Fonts/davesfont.ttf"
Global newfont=LoadImageFont("Fonts/davesfont.ttf", 20)


Thanks,

Dave.


skn3(Posted 2005) [#2]
Global newfont=LoadImageFont("incbin::Fonts/davesfont.ttf", 20)



Big_Dave(Posted 2005) [#3]
I have just tested that and it didnt work. The first method works fine but incbin does not. Any ideas?


Yan(Posted 2005) [#4]
You can't incbin fonts directly...

http://www.blitzbasic.com/Community/posts.php?topic=41362