Using Italic Fonts

BlitzMax Forums/BlitzMax Beginners Area/Using Italic Fonts

Arabia(Posted 2011) [#1]
Just been reading the tutorial on fonts that Assari made (http://www.2dgamecreators.com/tutorials/gameprogramming/fonts/T1_fonts.html)

He mentions in a section that the ITALICFONT, BOLDFONT etc. don't seem to work when loading fonts using LoadImageFont and so you need to load each font individually. Which doesn't worry me, since most fonts (Arial for example) have individual files for normal, bold, italic & bold italic.

But if you want to use Arial Black font (ARIBLK.TTF), there is only one font file? Any ideas for using this font in Italic? The ITALICFONT flag doesn't work (or doesn't work for me)

Just on fonts, Arial I assume is a standard font. Unless it's been deleted, every PC (even Mac & Linux?) should have this font, is that correct? The font info in Windows says it's copyright The Monotype Corp. which means under no circumstances you can distribute this font or include it within your program?


Czar Flavius(Posted 2011) [#2]
Interesting question, I'd also like to know the answers. You'd probably find out more on a dedicated forum though. Post back if you find anything!


xlsior(Posted 2011) [#3]
Arial is a windows font. The Mac (and Linux?) equivalent is Helvetica. It may be installe don some non-windows machines, but you can't count on it.

And although I doubt that Arial will disappear any time soon, Microsoft is now focusing on its cleartype font collection, and is pushing the Calibri font instead of Arial.


Arabia(Posted 2011) [#4]
Thanks xlsior. I haven't used a Mac or Linux PC in a very very long time.

Pretty much, you can never be guaranteed that a user will have the font you are using. So unless you get a royalty free font, or make your own font - the only other thing you can do is chuck up a runtime error and tell the user that they need a font before letting them play your game I guess.


Czar Flavius(Posted 2011) [#5]
you could fallback to another font if the desired one cannot be found.


Arabia(Posted 2011) [#6]
-removed double post-

Last edited 2011


Arabia(Posted 2011) [#7]
Yeah I guess, but when you are formatting the screen to look nice, changing fonts can fowl things up nicely.

I'll stick with Arial for now, I'm a long way from finishing this game. If I do finish, I'll deal with it at that stage.

I guess I can just remove the fonts I've got at the moment, re-run and see what happens with the blitz default font.

Just tried it, it doesn't look as good - but it's far from being terrible.


Dabhand(Posted 2011) [#8]
Surely, bitmap fonts would be the way to go:-

http://forums.indiegamer.com/showpost.php?p=62823&postcount=2

Dabz


Arabia(Posted 2011) [#9]
I'll try and have a look at this, thanks Dabz.