No TTF font support?

Community Forums/Monkey Talk/No TTF font support?

SLotman(Posted 2012) [#1]
I've downloaded the latest Monkey 'demo' (version 45c) - but I see it has no true type font support?

Why not?

You can use TTF on PCs, on Macs, on Android (Yes, I have my own LoadImageFont in Java!), Flash and even on HTML5... can't say anything about iPhone, but I suppose it should be able to use TTFs... (Yeah, I guess it can be done: http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application)

I made a very simple app for Android, which I want to make for iPhone too - where I really need to render TTF fonts - bitmap fonts simple won't do.

Was this implemented on later Monkey versions? If not, is there any hope that it will be used?

Or do I have to do the same thing I did on Android, and develop my own blitzmax-like syntax so I can port things easily? =(

Last edited 2012


skidracer(Posted 2012) [#2]
No you need to use bitmap fonts.

Monkey is definitely not for you if bitmap fonts "simply won't do".

Last edited 2012


therevills(Posted 2012) [#3]
You can of course create the code yourself and extern it in Monkey.


SLotman(Posted 2012) [#4]

No you need to use bitmap fonts.
Monkey is definitely not for you if bitmap fonts "simply won't do".



Can't be done with it. I'm doing something like a 'handwritting' - so each font has a different size, and a different offset/position when drawn


You can of course create the code yourself and extern it in Monkey.


Well, if I have to learn obj-c to get this (and other stuff), then there is no purpose at all in using Monkey... I was just trying to save me some time :P

Can anyone recommend a 2D engine to be used in obj-c?
I've looked briefly 'Cocos2D', but I don't like that 'everything is a scene' approach at all...


GfK(Posted 2012) [#5]
Don't really get what the issue is. Even in Blitzmax TTFs are internally converted to bitmap fonts so like it or not, you ARE using bitmap fonts.

Saying that you need to use TTFs and bitmap fonts "won't do", is like saying I'm not going in my chauffeur-driven Limo today, I'd much rather take my unicycle with no seat on it down a cobbled alleyway.


Floyd(Posted 2012) [#6]
Text rendered from bitmap fonts consist of a series of rectangles which hold the images of letters. There are fonts which can't be put in this form. These would usually be ornate designs such as Angel Tears. Note the Te at the start of tears.

There can even be problems with more ordinary fonts. You've probably seen examples of wide letters such an italic W with the right edge clipped because it doesn't fit in the preassigned box.


GfK(Posted 2012) [#7]
Text rendered from bitmap fonts consist of a series of rectangles which hold the images of letters. There are fonts which can't be put in this form. These would usually be ornate designs such as Angel Tears. Note the Te at the start of tears.

There can even be problems with more ordinary fonts. You've probably seen examples of wide letters such an italic W with the right edge clipped because it doesn't fit in the preassigned box.
Fair point but that's exactly the reason why you need to adjust kerning on some characters. As far as I know, FontMachine doesn't support this, though others might.


Sledge(Posted 2012) [#8]
I've looked briefly 'Cocos2D', but I don't like that 'everything is a scene' approach at all...

I really like Cocos2D -- the scene thing has it's advantages (to the extent that I automatically started writing a scene manager for my Monkey stuff) so don't let that put you off until you've given it a go. I just downloaded PhoneGap, which is basically mobile development in HTML5 (which is basically mobile development in HTML, CSS and JavaScript I'm given to understand), so it might suit you better if you want more advanced text support than Monkey offers.


ziggy(Posted 2012) [#9]
Fair point but that's exactly the reason why you need to adjust kerning on some characters. As far as I know, FontMachine doesn't support this, though others might.

FontMachine does support this since first version. It render transparent PNGs so handwritte-like fonts do render properly. Additinoally, you can alter the kerning in a per-letter bassis if you need it to, but I've really never needed it.

DEMO HERE:
http://www.jungleide.com/fontmachine/demo01/MonkeyGame.html

Last edited 2012