Re: about P1 part of BIDI alogrithm

From: Philippe Verdy <verdy_p_at_wanadoo.fr>
Date: Tue, 11 Oct 2011 17:03:51 +0200

2011/10/11 "Martin J. Dürst" <duerst_at_it.aoyama.ac.jp>:
> Hello Kent,
>
> I was also very much thinking that mirrored glyph should be of the same
> width, but there might be subtle issues when you consider kerning. As a very
> basic example, think about kerning of the pair K), and then think about K(.

Mirroring may also mean much more than a simple symetry: think about
italicized glyphs, or the slant of a slash or backslash, and even
their visual variation of weight in fonts that have constitantly
thicker stems depending on stroke directions... You cannot even
warranty that a '(' will then have the same width as a ')', even if
kerning is disabled.

So you'll need to first compute the directionality of all characters
in a paragraph (where paragraph are broken by strong line breaks
encoded in the text (or in a upper-level protocol like HTML using "br"
elements or elements delimiting blocks). Then you'll be able to map
the mirrored glyphs (ignoring first all the candidate breaks). Then
only you'll be able to perform the correct substitutions and
positioning and finally to compute the advance widths that allow to
determine the position of line breaks. Only then you'll be able to
reorder the characters within broken lines.

You cannot assume that mirrored glyphs have the same metrics, in fact
this is wrong in many fonts, even in straight/roman styles... This is
even more visible with bold or black font weights,or double-stroke, or
shadowed styles...
Received on Tue Oct 11 2011 - 10:08:30 CDT

This archive was generated by hypermail 2.2.0 : Tue Oct 11 2011 - 10:08:31 CDT