Font loading problem
Blitz3D Forums/Blitz3D Programming/Font loading problem
| ||
I'm trying to load a font, specifically one called Vectorb (available from this site: http://www.empire-of-the-claw.com/Fonts/Fontpages/claws_game_zone.htm - the font is called Vector Battle). Trouble is that it doesn't appear to load - Blitz3D doesn't generate an error when I try and use it, instead it just seems to use its default font. I'm loading it with: ;set vector font Global fntVectorb fntVectorb=LoadFont("Vectorb",18) SetFont fntVectorb The font works fine in apps like Word. I notice that Symbol fonts like WingDings don't work with Blitz, so is this Vectorb font perhaps classed as a symbol font? Also, where does Blitz require the font file to be? It's now in its normal directory of windows\fonts and I've also tried copying it to the folder with the .bb program files but to no avail. Thanks |
| ||
Fonts usually seem to be more reliable when: a) They are installed in your Fonts folder (Under Windows) b) They are loaded from the same directory as the executable/.bb So it looks like you've done the right thing. I do note, that the name of your Font File is "Vectorb" Ideally this should be Vectorb.TTF or similar. Ture Type (.TTF) fonts are loadable. The best way to get them working is to rename the file to match the heading in the Font Viewer screen (the screen that appears if you double-click a .TTF file) i.e. I have a font installed here called 'Calligrapher.TTF' in the Foont Viewer, it is called Calligular Regular (True Type) So I would rename the file to Calligrapher Regular.TTF Give that a try. Otherwise, it may be unfortunately classed as a Symbol foint which is an issue as you noted. |
| ||
That worked a treat Malice, I thank you - excellent stuff. :-) Is that then a limitation of Blitz, ie the renaming of the file? |
| ||
As far as I am aware (which aint very far hehe) its just a strange property with the LoadFont command. I dunno if its down to Blitz, the file type or Windows or what. Can be annoying, but not too much hassle to workaround! |
| ||
Fair enough. Worth noting though. |