Fonts 4 Monkey

Monkey Forums/Monkey Code/Fonts 4 Monkey

DrT(Posted 2012) [#1]
I wrote a program in PureBasic (no blasphemy intended) that allows the user to select one of the fonts installed on his/her machine, size it, style it (e.g. bold, underline, strikeout), set the front color, set the front color alpha, set the back color and set the back color alpha. The program then outputs an image (similar to mojo_font) and a text file that keeps track of the character positions and character widths.

Here is a live (flash) example: http://www.muskingum.edu/~richardt/fonts4monkey/MonkeyGame.html

You can obtain a Windows (x86) Purebasic executable at http://www.muskingum.edu/~richardt/fonts4monkey/fonts4monkey.exe

To run the executable, you will also need a text file that lists the fonts that are available on your system. You can obtain the one I used at http://www.muskingum.edu/~richardt/fonts4monkey/fonts4monkey.txt
You'll need to edit it for your system. [UPDATE: You will need to copy the text from the browser, save it in a file fonts4monkey.txt and make sure that it is in the same directory as fonts4monkey.exe]

You can obtain the source at http://www.muskingum.edu/~richardt/fonts4monkey/fonts4monkey.pb
Feel free to tweak it, compile it for Mac or Linux or port it to another language.

Here is the monkey code that generated the live example.



Notes:
I've noticed that some of the font images end up with stray artifacts. These can be cleaned up in Paint.
I will continue to work on this and post updates, so please let me know if you have any suggestions.


Sub_Zero(Posted 2012) [#2]
Nice, thanks