[kern/kerx] Enable crossStream kerning in vertical
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 7 Nov 2018 16:21:09 +0000 (11:21 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 7 Nov 2018 16:21:09 +0000 (11:21 -0500)
CoreText doesn't, but no reason we shouldn't do.

src/hb-aat-layout-kerx-table.hh
src/hb-ot-kern-table.hh

index 2a12a0b..3418327 100644 (file)
@@ -334,10 +334,10 @@ struct KerxSubTableFormat1
            {
              if (crossStream)
              {
-               /* CoreText doesn't do crossStream kerning in vertical. */
-               //crossOffset += v;
-               //if (!buffer->pos[idx].x_offset)
-               //  buffer->pos[idx].x_offset = c->font->em_scale_x (crossOffset);
+               /* CoreText doesn't do crossStream kerning in vertical.  We do. */
+               crossOffset += v;
+               if (!buffer->pos[idx].x_offset)
+                 buffer->pos[idx].x_offset = c->font->em_scale_x (crossOffset);
              }
              else
              {
index e065b6f..e205b4b 100644 (file)
@@ -161,10 +161,10 @@ struct KernSubTableFormat1
            {
              if (crossStream)
              {
-               /* CoreText doesn't do crossStream kerning in vertical. */
-               //crossOffset += v;
-               //if (!buffer->pos[idx].x_offset)
-               //  buffer->pos[idx].x_offset = c->font->em_scale_x (crossOffset);
+               /* CoreText doesn't do crossStream kerning in vertical.  We do. */
+               crossOffset += v;
+               if (!buffer->pos[idx].x_offset)
+                 buffer->pos[idx].x_offset = c->font->em_scale_x (crossOffset);
              }
              else
              {