shithub: freetype+ttf2subf

Download patch

ref: 493aa68f5c4cb2e659570809931539dc1987630c
parent: 2a9850c4fc2fd75021359346c9ffc7478f12d449
author: Werner Lemberg <[email protected]>
date: Fri Sep 21 04:32:22 EDT 2018

[base] Some comments.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -391,8 +391,10 @@
     case FT_RENDER_MODE_MONO:
       pixel_mode = FT_PIXEL_MODE_MONO;
 #if 1
-      /* undocumented but confirmed: bbox values get rounded    */
-      /* for narrow glyphs bbox is extended to one pixel first  */
+      /* x */
+
+      /* undocumented but confirmed: bbox values get rounded;  */
+      /* for narrow glyphs bbox is extended to one pixel first */
       if ( pbox.xMax - pbox.xMin <= 1 )
       {
         if ( pbox.xMax - pbox.xMin == 0 )
@@ -404,8 +406,13 @@
           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.xMax += ( cbox.xMax + 32 ) >> 6;
+
+      /* y */
 
       if ( pbox.yMax - pbox.yMin <= 1 )
       {