About LoadFont - "Fonts" folder or...

Blitz3D Forums/Blitz3D Beginners Area/About LoadFont - "Fonts" folder or...

vinnicius(Posted 2017) [#1]
LoadFont looks for a font inside "windows/fonts" folder or a font placed in the game directory?

Which one is correct? Because for me just the second one has worked.

"ARIAL"

LoadFont("arial.ttf",10)


or

LoadFont("Arial",10)



RemiD(Posted 2017) [#2]
the font name is not necessarily the same as the font filename
Arial15Font = loadfont("Arial",15,false,false,false)



Dan(Posted 2017) [#3]
"Arial" is the right name. You can load the font from a Folder, then it must have the correct filename and path.

Once, iv wrote a tool in Pure Basic, which brings a Font Requester up, lets you choose a font, size and properties, and copies the correct line into clipboard (when you clik on Ok).
It is found here:

Font tool (select Font)


Imperium(Posted 2017) [#4]
You do not need to put the .ttf extension. As a general rule of thumb you should always check to see if the font can be found.


vinnicius(Posted 2017) [#5]
Thank you! It is wierd that i know how to do some complex things, but sometimes I can't get some of the basics... :D


vinnicius(Posted 2017) [#6]
So... It should work:

LoadFont("data\gamefonts\arial",14)



But it does not work. :(


grable(Posted 2017) [#7]
Thats because its not a complete path. The function either takes a name OR a path, so tack on .TTF or whatever and itl work.