> I called > > FT_Set_Pixel_Sizes(face, 40, 20); > > hoping to get a glyph of 20x40 dimension in pixels, but when I used > `face->glyph->bitmap' to access the bitmap, its dimension is 26*14.
The documentation of FT_Set_Pixel_Sizes says You should not rely on the resulting glyphs matching, or being constrained, to this pixel size. Refer to FT_Request_Size to understand how requested sizes relate to actual sizes. and FT_Request_Size says The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' Assuming an arbitrary outline font there is only the trial and error method to get a glyph bitmap with an exact bbox of 20x40 pixels, playing around with `pixel_width' and `pixel_height' parameters of `FT_Set_Pixel_Sizes'. Werner _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
