W3C home > Mailing lists > Public > public-svg-wg@w3.org > April to June 2011

ligature formation across text chunks

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 13 May 2011 14:53:01 +1200
To: public-svg-wg@w3.org
Message-ID: <20110513025300.GI5029@wok.mcc.id.au>
The spec says that every x or y value on a <text> element starts a new
text chunk, and that ligatures do not get formed across text chunk
boundaries.  However, in http://www.w3.org/TR/SVG/text.html#TSpanElement
just below the attribute definitions, there is this text:

  The following additional rules apply to attributes ‘x’, ‘y’, ‘dx’,
  ‘dy’ and ‘rotate’ when they contain a list of numbers:
    * When multiple XML characters map to a single glyph (e.g., when a
      ligature is used) - Suppose that the i-th and (i+1)-th XML
      characters map to a single glyph. In this case, the i-th value for
      the ‘x’, ‘y’, ‘dx’, ‘dy’ and ‘rotate’ attributes all apply when
      rendering the glyph. The (i+1)-th values, however, for ‘x’, ‘y’
      and ‘rotate’ are ignored (exception: the final ‘rotate’ value in
      the list would still apply to subsequent characters), whereas the
      ‘dx’ and ‘dy’ are applied to the subsequent XML character (i.e.,
      the (i+2)-th character), if one exists, by translating the current
      text position by the given amounts before rendering the first
      glyph associated with that character.

You can never have a multiple XML characters mapping to a single glyph
when you have an x or y value specified for the second or subsequent XML
characters, because it would cause the ligature not to be formed.

  <text x="10 20">fi</text>

Even with a font that would otherwise form a ligature here, the f should
be painted at x = 10 and the i at x = 20.  I think the text quoted above
is misleading, then.

Can someone confirm my reading of the spec?

Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 13 May 2011 02:53:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:13 UTC