Hello again,
I can get all of my game working in retina resolution except for bmfont. I've created the
@2x image and have the
@2x .fnt file (created in Glyph Designer) but when testing the text is not correct.
Has anyone got any experience with retina and bmfont please?
Comments
Mike
The problem is that the @2x version of the font I create doesn't display correctly, basically it's showing incorrect areas of the texture for each character. I think I know why - Gideros uses the standard version of the image to work out sizing for higher res imagery, so it will expect a 128 x 128 at sd, to be 256 x 256 at hd. But that's not how GlyphDesigner works, the textures are completely different if you export the font at different sizes (texture dimensions are different and glyphs will not be in the same places either)
I've been trying bmGlyph from the mac app store and this outputs all the different resolution versions as the same image, rescaled - so the glyphs are all in the same place and the actual texture dimensions relate to each other correctly. That's why that one works.
Hope that helps. If you need any more info just let me know.
It's wasteful on texture memory but it works.
Use this to call BMFont:
It then calls BMFont, including the extension in the .fnt filename and adding the scaling amount, sc, to the call. The sc addition is then used when creating the text to display to scale all the values from the .fnt file.
In order for this to work correctly, dimensions of font images *must* be related, e.g. if your sd image is 256 x 128, your hd image must be 512 x 256 and super hd 1024 x 512, for example. This is because Gideros uses the sd version to determine the scaling on higher resolution images - see my thread about that here: http://www.giderosmobile.com/forum/discussion/1906/how-gideros-processes-higher-resolution-images#Item_1
If all that's in order you can use GlyphDesigner to create your fonts and get the higher resolution ones showing correctly.
NOTE: This is rough and ready, so there may be problems, there may not be. Caveat Emptor!
still confused :-/
Would it help if I uploaded a full project example?
no need to upload the full project. thanks.
http://www.giderosmobile.com/forum/discussion/1906/how-gideros-processes-higher-resolution-images#Item_2