FW: [OpenType] Reverse chaining contextual lookup

Levantovsky, Vladimir vladimir.levantovsky at monotypeimaging.com
Wed Feb 9 23:32:05 CET 2011


Forwarding Sergei's response to the AHG list. 
Unfortunately, the OpenType list strips all other recipients when emails are sent to the list subscribers so the responses cannot be sent to all original intended lists. Please make sure to include both mpeg-OTspec and OpenType lists on your response.

Thank you,
Vladimir


-----Original Message-----
From: listmaster at indx.co.uk [mailto:listmaster at indx.co.uk] On Behalf Of Sergey Malkin 
Sent: Wednesday, February 09, 2011 4:47 PM
To: multiple recipients of OpenType
Subject: RE: [OpenType] Reverse chaining contextual lookup

Message from OpenType list:


When we designed reverse chaining lookup format, problem was in clear definition of desired behavior. In normal lookups, we always know that layout engine is going through characters and we know which character they are applied to. With reverse, this was not that clear. Consider following ligature substitution (contextual is not really needed for my example):

AAB -> M
AB -> N

And let's say input will be AAB.

If we are moving forward, we will try lookups at position A, then at second A, and then at B. And this is clear that AAB sequence will be matched and substituted.

If we are moving backwards, engine would check for sequences starting with B, then from second A, then from first A:

  - AB will be matched because it starts closer to where lookup starts iteration from end to back. 
  - AAB will be matched if we say both start at B and go towards beginning of the input string. 

We neither did see why one should be preferred over another, nor how it can be described clearly in the spec so it will be unambiguously defined. So we decided to restrict lookup to the case of single glyph, which is unambiguous. This lookup had single clear scenario of supporting Urdu script, and format we ended up with was perfectly enough.

This is my recollection from 2001, when we defined reverse chaining lookup. So I may be wrong in some details, but this summarizes our thinking at that time.

Thanks,
Sergey

-----Original Message-----
From: listmaster at indx.co.uk [mailto:listmaster at indx.co.uk] On Behalf Of Mansour, Kamal
Sent: Tuesday, February 08, 2011 2:00 PM
To: multiple recipients of OpenType
Subject: [OpenType] Reverse chaining contextual lookup

Message from OpenType list:


>****** Attachments to this email message have been removed ******

Use of Reverse Chaining

The current definition of reverse-chaining single substitution recognizes that for some situations it is best to search backwards for a pattern in a run of text. This type of lookup was introduced specifically to cope with the complexities of the Nastaliq style of Arabic script. It turns out that a full implementation of other styles of Arabic writing, including Naskh, could also benefit from such a scan of a run of text.

Upon matching a pattern, the current definition of the reverse-chaining lookup allows only a simple one-to-one substitution to take place. The following extract is from the OpenType spec:

    Reverse Chaining contextual single substitution, allows one glyph to be  substituted with another by
    chaining input glyph to a 'backtrack' and/or  'lookahead' sequence. The difference between this and
    other lookup types is  that processing of input glyph sequence goes from end to start.

In many contexts, a simple substitution may not be enough to carry out the necessary changes. Moreover, the normal (i.e., forward-scanning) chaining contextual lookup permits a broader choice of actions when a pattern is matched, including the direct invocation of another lookup.

I propose the addition of a new reverse-chaining, contextual-substitution lookup type which is identical in functionality to the ordinary contextual-substitution lookup except for directionality.

I look forward to your comments.

Kamal Mansour
Monotype Imaging



>****** Attachments to this email message have been removed ******



List archive: http://www.indx.co.uk/biglistarchive/

subscribe: opentype-migration-sub at indx.co.uk
unsubscribe: opentype-migration-unsub at indx.co.uk
messages: opentype-migration-list at indx.co.uk






List archive: http://www.indx.co.uk/biglistarchive/

subscribe: opentype-migration-sub at indx.co.uk
unsubscribe: opentype-migration-unsub at indx.co.uk
messages: opentype-migration-list at indx.co.uk




More information about the mpeg-otspec mailing list