Re: how can I set exactly pixel?

2019-12-27 Thread sylvain . bertrand
On Fri, Dec 27, 2019 at 12:58:22PM +0100, Werner LEMBERG wrote: > For most outline fonts, it is not possible to get exact glyph > dimensions in advance (exception: the font contains an `hdmx' table > that holds horizontal, device-dependent information for selected pixel > sizes). In other words,

Re: how can I set exactly pixel?

2019-12-27 Thread Werner LEMBERG
>> For most outline fonts, it is not possible to get exact glyph >> dimensions in advance (exception: the font contains an `hdmx' table >> that holds horizontal, device-dependent information for selected >> pixel sizes). In other words, you have to render all (needed) >> glyphs to get their

Re: how can I set exactly pixel?

2019-12-27 Thread sylvain . bertrand
On Fri, Dec 27, 2019 at 07:00:58PM +0100, Werner LEMBERG wrote: > As the name of such font says, all glyphs have the same advance width. > However, there is *zero* guarantee that the outline stays in a certain > rectangle that is as wide as this advance width. For example, imagine > a slanted

Re: how can I set exactly pixel?

2019-12-27 Thread Werner LEMBERG
> I am currently working on a Thai text synthesis project which used > freetype. My code is as follows (I’m using the font:“angsa.ttf”): > > if (FT_Set_Pixel_Sizes(face, charWidth, charDotSize) != 0) > { > return (ERROR); > } > > ascender = FT_MulFix(face->ascender,

Re: how can I set exactly pixel?

2019-12-27 Thread Werner LEMBERG
>> For most outline fonts, it is not possible to get exact glyph >> dimensions in advance (exception: the font contains an `hdmx' table >> that holds horizontal, device-dependent information for selected >> pixel sizes). In other words, you have to render all (needed) >> glyphs to get their

Re: how can I set exactly pixel?

2019-12-27 Thread sylvain . bertrand
On Fri, Dec 27, 2019 at 12:58:22PM +0100, Werner LEMBERG wrote: > For most outline fonts, it is not possible to get exact glyph > dimensions in advance (exception: the font contains an `hdmx' table > that holds horizontal, device-dependent information for selected pixel > sizes). In other words,

Re: how can I set exactly pixel?

2019-12-27 Thread sylvain . bertrand
On Fri, Dec 27, 2019 at 07:00:58PM +0100, Werner LEMBERG wrote: > As the name of such font says, all glyphs have the same advance width. > However, there is *zero* guarantee that the outline stays in a certain > rectangle that is as wide as this advance width. For example, imagine > a slanted

Re: how can I set exactly pixel?

2019-12-27 Thread Werner LEMBERG
> I am currently working on a Thai text synthesis project which used > freetype. My code is as follows (I’m using the font:“angsa.ttf”): > > if (FT_Set_Pixel_Sizes(face, charWidth, charDotSize) != 0) > { > return (ERROR); > } > > ascender = FT_MulFix(face->ascender,