After export font with Gideros font tool, I've got a file .txt, like:
0
32
1 1
0 0
0 0
256 0
33
17 1
2 10
1 10
256 0
Would you please let me know more information about this file, and how it's used in TextField
Afaik:
33 --> char code
17 1 --> letter position in image
2 10 --> size of letter
1 10 --> base height, and unknown value
256 0 --> unknown
font-descent-height = size[0] - base_height
Regards,
Comments
@atilim would it be nice to include this information in reference document? Shall I file a request for this on bugs.giderosmobile.com?
Likes: MikeHart
I think there're something different here:
For font arial - italic size11, letter A (see attachment)
65
79 40
8 8
-1 8
448 0
I dont know clearly (-1, 8), and (448, 0) is used for. About (448, 0) , I think that it's not relative to dx2, dy2 as http://www.giderosmobile.com/forum/discussion/comment/6215#Comment_6215
because size of image is 114x143 <<< 448
Regards,
We're using FreeType2 to render fonts and all these values are related to FreeType2's glyph metrics: http://www.freetype.org/freetype2/docs/tutorial/step2.html
33 --> char code
17 1 --> letter position in image
2 10 --> size of letter
1 10 --> bearingX, bearingY (or bitmap_left, bitmap_top)
256 0 --> advanceX, advanceY (multiplied by 64)
Here bearing is used to render the glyph at correct position and advance is used to move the pointer to the next position (advanceY is always 0).
here is a code from http://www.freetype.org/freetype2/docs/tutorial/step1.html to render a text which explains these values:
Likes: phongtt, atilim