[HarfBuzz] Problems with TTB Japanese
Khaled Hosny
khaledhosny at eglug.org
Fri Jun 12 01:55:25 PDT 2015
On Fri, Jun 12, 2015 at 12:55:27PM +0900, Simon Cozens wrote:
> On 12/06/2015 09:17, Behdad Esfahbod wrote:
> > This happens because HarfBuzz thinks your font instance is set for horizontal
> > typesetting. That is, this returns offsets that work with a font that has
> > origin at baseline-left. What you expect instead can be achieved by
> > configuring the font to use a top-center origin.
> >
> > What font funcs are you using?
>
> This may be the problem. I'm using hb_ft_font_create, getting the glyph
> information and positions. I use x_offset and y_offset from
> hb_buffer_get_glyph_positions to alter the cursor position. (because
> otherwise Arabic doesn't work), and then use a function like this to
> get the metrics to put the glyph in a (TeX-like) box:
>
> (Following code mostly stolen from XeTeX, with the TTB special case
> added yesterday after talking to the rubber duck.)
Note that XeTeX does not really support vertical typesetting, it lays
the vertical text horizontally and expects the user to rotate it, so it
might not be the best source of inspiration (unless this is how your
code works, of course).
Regards,
Khaled
More information about the HarfBuzz
mailing list