It looks like you're new here. If you want to get involved, click one of these buttons!
What does the ?????? do. It appears to be a multiple of 64 but I don't know what it's used for.
char, Glyph character number xoffset, yoffset, u, v coordinates of the glyph within the texture width, height, actual size of the glyph xspacer, spacing added to width to draw next glyph ?? baseline, offset added to y position to draw base of glyph ?? ????????, unknown 0 unknown
Likes: fxone
Comments
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
char,
xoffset, yoffset
width, height,
bearingX, bearingY,
horiAdvance, vertAdvance
Your guess of char, xoffset, yoffset, width and height is correct. The values bearing and advance are described here more clearly: http://www.freetype.org/freetype2/docs/tutorial/step2.html And horiAdvance/vertAdvance are multiple of 64 and vertAdvance is always 0 in our case.
On the other hand, the texture loaded by Font class is transformed internally. Therefore you won't get the result you want.
In this case, using a TexturePack would be equally efficient. There is a project here https://github.com/gideros/bmfont that allows you to use BMFonts in Gideros. Most probably this project solve all your problems.
The only issue I had was that I'd already reserved space around each character in photoshop to add a drop shadow and a stroke however this was easily fixed by just storing a constant "kerning" value with each font which was subtracted from the width of each character to compensate.
The only reason I went this route was because I already had the font split into individual characters, if I was going to do it again in the future I'd probably use the BMFont library as the BMFont tool is really easy to use and works well.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Likes: atilim
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
(Also, I can recommend adding _ to the local variable list as r,g,b,_)
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Likes: gorkem, atilim
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
num = 0xf00d00
print(tonumber("0x" .. num))
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
@OZApps aha! great trick
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
In terms of bytecode, yes the math works as
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps