19 Apr 2012 21:52
[ft] glyphs' metrics and positioning
Wojciech Mamrak <wmamrak <at> gmail.com>
2012-04-19 19:52:14 GMT
2012-04-19 19:52:14 GMT
Hello List!, I would like to present some of my questions and doubts regarding mostly glyphs' metrics and positioning. I will try to be concise. Data reliability in glyphSlot->metrics Based on the image from tutorial step 2: http://www.freetype.org/freetype2/docs/tutorial/metrics.png advance = bearingX + width + x //for horizontal text layouts Assume I need to know the value of x - I can obtain it from the above formula. I've made a test: freetype 246, font arial 5.10, font size 40px, FT_LOAD_FORCE_AUTOHINT, FT_RENDER_MODE_LCD, FT_LOAD_TARGET_LCD, FT_LCD_FILTER_DEFAULT, character '1': (values based on 26.6 pixel format) advance: 22.0px bearingX: 4.0px width: 11.0px Attached image presents the rendered glyph with additional border so that bearingX can be verified. Values taken from the image (ft_1.png): advance: 22px bearingX: 4px width: 13px //!! I have also noticed some issues with metrics.advance. Specification as(Continue reading)
RSS Feed