Does Monkey X have built in Font?

Monkey Forums/Monkey Beginners/Does Monkey X have built in Font?

En929(Posted 2014) [#1]
I was wondering does Monkey X have it's own built in font that can be used for games? It seems like in every tutorial I've seen, someone uploads their own font from a folder. Thus instead, if there is built in font how do I access it and use it in the game I'm working on if I want in game text,etc?


Gerry Quinn(Posted 2014) [#2]
There is one, but AFAIK it's only for printing to the console.

I use AngelFont, and you can find an example in bananas/beaker which includes a pre-made font, There's an alternative one that some people use also.


dawlane(Posted 2014) [#3]
If you are using mojo then Monkey's font is actually a png file named mojo_font.png that gets added to the projects data directory in the .build release/debug directories. It's very basic and only there really as a means to allow you to do debugging/monitoring. You can modify this image file for your own needs but you have to stay within it's size limits. Ideally you should do your own text rendering functions or a ready made framework. If you are using the Print command then it depends on what was set for the systems fonts as output usually goes to a console window.


Midimaster(Posted 2014) [#4]
Have a look on the AngelFont sample in the bananas folder. This shows the way you should draw texts in monkey games.


Aman(Posted 2014) [#5]
You have many options when it comes to writing text with monkey.
1. Use Monkey's DrawText with the default font which is 7x11 white on black font. I would edit it and delete the background to make it more useful.
2. Use Monkey's DrawText with your font with SetFont with a font you made. your font should be an image with a number of frames each containing 1 character.
3. Use FontMachine which has much more capabilities and if you have a jungle IDE license, there is a free tool that allows you to easily generate FontMachine fonts.
4. You could make your own font module. I made mine so that I can set the size, style, and texture of the font.


En929(Posted 2014) [#6]
Ok, this is very different from what I've done in game development previously. For a scoreboard, what I've done is I went into Paint.Net and made my own fonts on 32 X 32 png files (I wrote numbers 0-9) and then pasted together all of those png files into one single png (or sprite sheet) via an animation program called "Glue It;" a program that I use to make frame animations for characters in my game, and then I uploaded the single png file into my game. That worked out. It was a longer process than what I'm used to compared with Java (or JavaScript) who have font libraries built in, but I guess it was a cool process because I could readily make my own handwritten fonts in my own unique fashion and creativity and that was good in itself and it was a learning experiences.