okay, I’ll give feedback as soon as I try it! 
…you’re absolutely right. bmGlyph is not passing on the padding. Bah!
Well, I give in. I’ll switch to Glyph Designer tomorrow morning and report in based on what I find.
…I posted and yet it’s not there?
Anyway, you’re right. Glyph designer worked, though there is some suspicious x-spacing. I wish there was a way to edit that in the Glyph Designer…
The bigger problem with Glyph Designer is working from large assets. Ideally you want your “core” asset to be the small one, because 2x, 3x, 4x can be multiples. If your big asset is core, then you need to make sure the entire rest of your project does the same. It may not seem like a big deal now but with @3x gaining in importance (it seems likely it will be the new iPhone resolution) assets will look sloppy at a res that can’t be evenly divided.
Ugh, so for some reason my project didn’t have a config.lua. That being said,
a ) The font is still highly blurry with one present
b ) @2x and @4x assets don’t seem to legible at all, as if they’re using either completely busted export details or perhaps the details of the 1x sheet.
Glyph Designer looks perfect though. Hmm.
I do wonder if it is mostly to do with BmGlyph and its settings. In *theory* they should do the same thing, and produce the same output, pretty much. All the library is doing, pretty much, is treating them as a sprite sheet and creating and animating those sprites. That bit is actually relatively straightforward.
Unless BmGlyph have wired it up in a really weird fashion it shouldn’t make any difference on 2x 4x and (1x) other than obvious things like the resolution and sheet size. From what I can see, what it does is create three fonts with the three different names.
Having used both of them Glyph Designer is more expensive, but it is a much better program in the way it is built.
The bmGlyph author sent me a working project and output files. It does appear to work well, at least, using his assets and the bmf.lua font controller he built. He says he sent you a message a few days ago and hasn’t heard back? (From talking with him he’s clearly motivated to make sure his stuff is working cross-library. And with fontmanager, it’s not; I’m reliably getting a hazy 1x and broken 2x/4x with everything bmGlyph outputs.)
You need not be confused by the multi-file output, by the way; display.newSprite uses the information given from the 1x asset, and them multiplies it as necessary if 2x or 4x assets are needed according to config.lua. The @2x/@4x fnt files are not used unless you choose to sub them in through code.
Anyway, I think Glyph Designer has a strong, consistent presentation but it just is missing some very important features right now that bmGlyph has:
- Substitute image for glyph
- Custom x-spacing per glyph (I have to edit the Glyph Designer .fnt file manually to do this…)
- A build wizard for automatic 1x/2x/4x/etc output.
- .lua instead of .fnt support if you want to roll that way
That being said, something is fishy with the numbers. I’ve dropped a sample export (1x,2x,4x textures + .fnt file) into dropbox if you want to give it a quick look. If the problem is on his end, I have to think there’s something wrong with the glyph coordinates, but I’m just not experienced enough with the format to see any tell-tale problems.
Hi. Can you forward my email address to him (paul@robsons.org.uk). I don’t recall having an email from him but I might have deleted it accidentally. I will try to contact them direct.
I have made some progress, I have got the FM using the correct sprite sheet - because I wasn’t setting sheetContentWidth and sheetContentHeight it always picked up the 1x display.
But there is another problem.
The .fnt file (your dropbox one) only has one layout of fonts.
However, if you look at newTest.png and newTest@2x.png, they are different layouts - different characters in different positions - it isn’t just a ‘scaled up’ version of newTest.png (which is, I think, how it’s supposed to work).
So there must either be some way of generating alternate .fnt file - otherwise I have no idea where the characters are - or alternatively some way of getting bmGlyph to use the same layout for every png file, just scaled to suit.
Thanks to Stephane at bmGlyph I now have more idea :)
The problem with bmGlyph is that as I suggested there is only one .fnt file - there should be three pairs, of .fnt files, usually called font.fnt font@2x.fnt and font@4x.fnt.
The way FM now works is it picks up a file appropriate for the scale. There is a calculation in the retina code tutorial which works out what the ‘preferred scale’ is - this returns a value between 1,2,3 and 4. 1 is a 320x480 iPhone, 4 a Retina iPad (2048x1536 ?)
What it does is to look for these backwards - so for a retina iPad it will start @4x (at font@4x.fnt) and work its way down until it finds a .fnt/.png file that exist. For a basic iPhone it will go straight to the 1 x scale file (e.g. font.fnt). So it pretty much picks the best available. You can override this, if you put font@4x in the font name it will use the 4x font irrespective of what else is there.
You still have the basic issue though that a 1x font has to look okay on the device it is running on. If bmGlyph or Glyph Designer produces a rather smallish font which is quite pixellated it’s going to stay looking pixellated. It is a trade off with texture memory.
The other change is that I have extended UTF-8 decoding so it uses up to the six byte character maximum, if anyone should want this.
Padding is still in the pipeline.
can i use this with starter Corona SDK? I’m getting a few error when running the demo
Don’t know - what errors are you getting ?
I posted in another thread you created, but just want to say: well done! again.
I tried out your demo and it is excellent 
If you want suggestions for more text effects… One i have always liked is the text effect used in the call of duty games. I think the best one to showcase this was in “call of duty modern warfare 1”
I’ll try and find you a vid if needed. It is a really nice text effect, with random letters in the string fading out at the end, and the whole string being created initially by cycling through random individual letters and stopping at the needed letter to make up the whole word.
Of course, we could create this ourselves, but thought i would throw it out there, seen as though you asked for suggestions 
I want to take a look at this, but off the top of my head (not knowing the specifics of your implementation), I’d need:
-
Multibyte character support (gotta support JP+KO+ZH)
-
Word-by-word effects (though personally I’d only need fade or “pop”. nothing fancy.)
-
Line break support. (A good game text display is usually two lines with 8-10 words.)
To be more specific, I’d look to fill the requirements of this blog post (Gamasutra).
Some good ideas - this first was in the pipeline, the second I hadn’t considered (you could do it now but I’ll make it a lot easier with a small change, you’d have to track the words yourself at the moment) and the last isn’t supported yet, but isn’t an enormous change.
Cheers.
Actually, one final improvement comes to mind: tinting. As the link explains, there is real value in color changing specific words, and Corona allows using setFillColor to tint graphics.
The only trick is that you’d need to develop a short code for it, so maybe it’s a change I have to add on later…
Hi, me again. The extended character set is something I hadn’t previously considered, and lua is just streams of 8 bit data. Is the best encoding format UTF-8 ?
GlyphDesigner seems to use 8 bit ASCII in its fonts. Some others don’t and use 16 bit character codes 
Multiline works - word effects isn’t done yet but is easy to do, tinting I haven’t yet looked at.
Yeah, I think UTF8 is what you need? Wouldn’t be too hard to test, at least - add a weird character to a bitmap font, try adding it to the string too, and see what happens…
Cheers
I should probably get it working tomorrow. Not sure about the tinting, haven’t looked at that yet.
In theory, it’s not too bad. The process would have to go something like this:
-
Use invented shortcodes in the string supplied. Maybe %red%, %blue%, etc. Depends what would cause the least problems with gsub. Each shortcode (and associated 0-1,0-1,0-1 color) would need to exist in a table. Add %default% wherever color should revert to normal. (Or go with an HTML style encapsulating method, either way…)
-
Write a function to intercept the string during a newBitmapText() call:
-
Use string.gsub or such to look for valid shortcodes
-
Record which words (or characters) need color changes.
-
Remove the shortcodes from the string (so it reads properly)
- When rendering the bitmap characters from imageSheet, look for a .color property. If found, :setFillColor() using whatever the shortcode color was.
(I believe Corona pro has a seperate tinting function through graphics.*, but :setFillColor() should still work, I think. Although the effect will vary a lot based on the actual font images themselves.)
Doesn’t quite fit the design. It’s designed so that simple f/x are dead easy, but if you actually want to zoom characters in and out individually, spin them round individually, and rotate/scale/translate the whole thing you can, but it needs a little coding (usually 2-4 lines !)
Probably something like have an overall method, setTintColor(), then some sort of character level tint, then finally render-modifying the final bitmap. It really depends on how well it works, I’ll experiment with it and see what happens.
Probably code up the word and line level functionality first, and release that as an interim (UTF-8 and Multiline are already in, though not as tested as much as I’d like, especially the multiline stuff, there’s a bug to fix if you print multiline text backwards (not quite sure why I did this …)
Okay, well it now has character/line/word functionality and supports multi-line and UTF-8 
Haven’t started with the tint yet, probably be in a couple of days.