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

Re: ligature formation across text chunks

From: Glenn Adams <glenn@skynav.com>
Date: Thu, 19 May 2011 15:25:16 -0600
Message-ID: <BANLkTi=KyT=hKD8UgcyFxDi2LSfOn4WWmg@mail.gmail.com>
To: Tavmjong Bah <tavmjong@free.fr>
Cc: Vincent Hardy <vhardy@adobe.com>, Cameron McCormack <cam@mcc.id.au>, "public-svg-wg@w3.org" <public-svg-wg@w3.org>
Tav,

I notice the following text in [1] which you cite below:


> Non-Latin alphabet perspective:


> An expert should be consulted to determine if ligature use is mandatory in some cases. Recall that 10.7.1 blocks ligature usage in some cases. Arabic and Hindi scripts may require ligatures, but at the same time they probably don't allow characters to be moved arbitrarily around.

The answer about Arabic, Devanagari (as used by Hindi), and other Indic
scripts is that they DO indeed require mandatory use of a wide variety of
ligatures and other forms of complex character to glyph mapping, such as:

   - 1 character mapping to M contiguous glyphs
   - 1 character mapping to M non-contiguous glyphs
   - N contiguous characters mapping to 1 glyph
   - N non-contiguous characters mapping to 1 glyph
   - N contiguous characters mapping to M contiguous glyphs
   - N non-contiguous characters mapping to M contiguous glyphs
   - N contiguous characters mapping to M non-contiguous glyphs
   - N non-contiguous characters mapping to M non-contiguous glyphs

Regards,
Glenn

[1] http://lists.w3.org/Archives/Public/public-svg-wg/2010JulSep/0005.html

On Thu, May 19, 2011 at 1:45 PM, Tavmjong Bah <tavmjong@free.fr> wrote:

>
> Hi all,
>
>        As usual, my Internet provider's spam filter block's Cameron's
> messages, so I'll reply to Vincent's email.
>
>        Ligature formation was discussed as part of Last Call Issue 2332:
>
> http://www.w3.org/Graphics/SVG/WG/track/issues/2332
>
> At the time I sent an email summarizing the issue:
>
> http://lists.w3.org/Archives/Public/public-svg-wg/2010JulSep/0005.html
>
> and created a test:
>
> http://dev.w3.org/SVG/profiles/1.1F2/ua-tests/ligature-breaking.svg
>
> At the time, we decided to defer to SVG 1.1F3/2.0 further consideration
> of how ligatures should be treated.
>
>                                                Tav
>
>
> On Thu, 2011-05-12 at 20:50 -0700, Vincent Hardy wrote:
> > Hi Cameron,
> >
> > On May 12, 2011, at 7:53 PM, Cameron McCormack wrote:
> >
> > > 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?
> >
> > (disclaimer: I had a bit of a long day, so I may not be processing this
> clearly enough :-)
> >
> > If I read the paragraph you quote and apply it to the example:
> >
> > a. the "f" and "i" characters map to a single 'fi' glyph (assuming the
> font has a ligature for the "f" + "i" character sequence). So characters at
> index i = 0 and i+1 = 1 map to a single glyph.
> > b. for i = 0, we should apply the x value at index 0, i.e., 10.
> > c. for i=1, we should ignore the value x, y and rotate, i.e., 20 is
> ignored.
> >
> > So I would say that the spec. says that in this case, the second x value
> is ignored. In implementation work I did (ok, that dates back a bit :-), I
> am pretty sure that is how I interpreted this.
> >
> > Cheers,
> > Vincent
>
>
>
>
Received on Thursday, 19 May 2011 21:26:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 19 May 2011 21:26:04 GMT