True type to Monkey

Monkey Forums/Monkey Programming/True type to Monkey

Vinians(Posted 2011) [#1]
Hi people!
I need to use a TrueType font on my game. There are some way to convert a ttf font without using any module? I want to use only mojo. A tutorial about it will be nice!
Thanks in advance!


AdamRedwoods(Posted 2011) [#2]
Monkey can't do vector fonts, only bitmap fonts.
http://www.monkeycoder.co.nz/Community/posts.php?topic=141


Vinians(Posted 2011) [#3]
Yes I know, but I need to know more details about how to create that bitmap fonts, things like, char spacing, first and last char and so on, with theses informations I will be able to create a program that read ttf and generate a bitmap. Anyone?


skid(Posted 2011) [#4]
There is a solution from Jungle IDE, there is one in bananas folder called angelfont that lists several programs.

Or you can code it yourself, 2 pages of .bmx does it for me.


Vinians(Posted 2011) [#5]
@skid Exactly, I want to code by myself, but not using Angelfont, I just want to change the internal mojo font. What I need is a tutorial about how mojo want that bitmap.


skid(Posted 2011) [#6]
Using Mojo's DrawText command does not compute.


muddy_shoes(Posted 2011) [#7]
You don't need a tutorial, just look the documentation for SetFont. It states that the font is "an image describing the font. Each image frame represents a single character in the font".

If you need more guidance then simply look in in the mojo module folder. The SetFont function is in graphics.monkey and the standard font image is in the data subfolder.