[HarfBuzz] Problems with TTB Japanese

Simon Cozens simon at simon-cozens.org
Thu Jun 11 00:14:18 PDT 2015


Hello! I am working on adding vertical typesetting support to SILE, and
have come across a couple of issues.

The first is that all characters with direction set to TTB seem to have
x_offset and y_offset positions set even when this does not make sense:

> a = "aあ"

> SILE.call("font", { family = "MS Gothic", direction = "TTB" })
> SILE.shaper:shapeToken(a, SILE.font.loadDefaults({}))
{
  {
    codepoint = 68,
    depth = -0.078125,
    height = 5.4296875,
    name = "",
    width = 5,
    x_offset = -2,
    y_offset = -8,
  },
  {
    codepoint = 2102,
    depth = 0.8984375,
    height = 8.0859375,
    name = "",
    width = 10,
    x_offset = -5,
    y_offset = -8,
  },
}

This happens for all fonts. I don't know why a fairly normal Japanese
character would be set downwards and to the left; it's causing things
not to line up to the kihonhanmen (character grid). Am I right in
thinking the idea is to cause Japanese and non-Japanese characters to be
aligned on the center axis?

The other problem I just solved by talking to the rubber duck.


More information about the HarfBuzz mailing list