loadimagefont

BlitzMax Forums/BlitzMax Programming/loadimagefont

ninjarat(Posted 2006) [#1]
I am having trouble getting loadimagefont to work. Can anyone tell or show me how to do it?


Curtastic(Posted 2006) [#2]
Cooncidentally I just figured it how a few hours ago. You have to find the actual tff file and load it. its usually in c:\windows\fonts\


ninjarat(Posted 2006) [#3]
Oh, that's how it works. I was kind of on the right track, I just hadn't figured it would work with *.ttf files. I thought it would only work with *.fon files.

Thanks. :)


GfK(Posted 2006) [#4]
I wouldn't use TTFs from the user's font folder for two reasons.

Firstly, you can't guarantee the font will exist on everyone's PC. Second, if you put the font there yourself then you'll upset people because they generally don't like having installers spread junk all over their hard drive.

Keep your game and all its assets in a self-contained folder.


xlsior(Posted 2006) [#5]
Or even incbin the fonts you use...


Grey Alien(Posted 2006) [#6]
Now there's an interesting concept...basically you can just distribute any old font with you game as many fonts are copyright (the actual .ttf file because it's code, of sorts) but you can make bitmap fonts from the font file and distribute those. *BUT* if you incbin a ttf font does that also get round the copyright issue because you are not actually distributing the font file and thus the only way to gain access to it would be to hack your .exe?

Any opinions on this as it sounds like a great legal way to use any font you want with your game!


GfK(Posted 2006) [#7]
if you incbin a ttf font does that also get round the copyright
If you incbin an MP3 does it get around the copyright?

Any opinions on this as it sounds like a great legal way to use any font you want with your game!
I'd advise against it.


ninjarat(Posted 2006) [#8]
Well incbinning them was what i was doing. just with fon files instead of ttfs. But it's OK, 'cause I got it figured out now. Just incbin. That way there's no WAY the font could get lost when you distro.


plash(Posted 2006) [#9]
Unless the exe is corrupted?
Well if the exe is corrupted then I think you have a bigger problem on your hands :D


Grey Alien(Posted 2006) [#10]
If you incbin an MP3 does it get around the copyright?
It's a different issue. With MP3s the "sound" is copyrighted (so are decoders or encoders or something, you weren't talking about that were you?) whereas with font's the actual "code" in the ttf file is what's copyrighted, and you can't distribute it, so if it's incbinned then the average user won't be able to use it and if someone hacks your game to remove it, they are doing something illegal anyway. Bitmap fonts are legal too of course. Maybe I should start a debate on this as I think incbinning would be a wicked way to include a copyright font because the author couldn't ever prove that you didn't just turn it into a bitmap font and incbin that, unless they hired an hacker to checkout your .exe + you can encrypt .exes too.


GfK(Posted 2006) [#11]
On your own head be it. I'll stick to bitmap fonts thanks! ;)


Grey Alien(Posted 2006) [#12]
The reason I'm lazy is I haven't made a bitmap font module yet... :-)

Anyway how do you incbin a font and then use it? I've never used incbin (except for in Assembly on the Amiga).