[base] Some comments.
This commit is contained in:
parent
2a9850c4fc
commit
493aa68f5c
|
@ -391,7 +391,9 @@
|
||||||
case FT_RENDER_MODE_MONO:
|
case FT_RENDER_MODE_MONO:
|
||||||
pixel_mode = FT_PIXEL_MODE_MONO;
|
pixel_mode = FT_PIXEL_MODE_MONO;
|
||||||
#if 1
|
#if 1
|
||||||
/* undocumented but confirmed: bbox values get rounded */
|
/* x */
|
||||||
|
|
||||||
|
/* undocumented but confirmed: bbox values get rounded; */
|
||||||
/* for narrow glyphs bbox is extended to one pixel first */
|
/* for narrow glyphs bbox is extended to one pixel first */
|
||||||
if ( pbox.xMax - pbox.xMin <= 1 )
|
if ( pbox.xMax - pbox.xMin <= 1 )
|
||||||
{
|
{
|
||||||
|
@ -404,9 +406,14 @@
|
||||||
cbox.xMin = cbox.xMax = ( cbox.xMin + cbox.xMax ) / 2;
|
cbox.xMin = cbox.xMax = ( cbox.xMin + cbox.xMax ) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* we do asymmetric rounding so that the center */
|
||||||
|
/* of a pixel gets always included */
|
||||||
|
|
||||||
pbox.xMin += ( cbox.xMin + 31 ) >> 6;
|
pbox.xMin += ( cbox.xMin + 31 ) >> 6;
|
||||||
pbox.xMax += ( cbox.xMax + 32 ) >> 6;
|
pbox.xMax += ( cbox.xMax + 32 ) >> 6;
|
||||||
|
|
||||||
|
/* y */
|
||||||
|
|
||||||
if ( pbox.yMax - pbox.yMin <= 1 )
|
if ( pbox.yMax - pbox.yMin <= 1 )
|
||||||
{
|
{
|
||||||
if ( pbox.yMax - pbox.yMin == 0 )
|
if ( pbox.yMax - pbox.yMin == 0 )
|
||||||
|
|
Loading…
Reference in New Issue