On 22 August 2011 22:40, John Hudson <[email protected]> wrote: > > > >> > Glyph ID inputs for OTL processing are according to reading/resolved order. > This is typically the same as logical order, but the term logical order > really applies to character strings, not glyph strings, which are much more > maleable. The order of input strings in GSUB lookups or contexts is > dependent not only on the underlying character order, but also on the > results of previous GSUB lookups. So while, unlike AAT and Graphite, > OpenType Layout doesn't explicitly provide for glyph re-ordering, some kinds > of glyph reordering are possible using sequences of contextual lookups to > duplicate a glyph in a second location in the string and then remove the > first instance. We use this in some Devanagari fonts to enable subsequent > ligation of short ikar variants to the left of a consonant base with reph > marks to the right of that base. > र्क्मि > > JH > > > Open Font Format GSUB tables contain glyphs in visual (or reading order) and not in logical order. The logical order of characters is transformed to a visual order of characters before the font layer. Thus for Devanagari, the I matra is moved left and the reph is moved right. It is this visual syllable of characters that is transformed to a visual syllable of glyphIds using the cmap table in the Open font. Consider Devanagari <RKMI>. The logical order of characters is <Ra Halant Ka Halant Ma IMatra>. This logical order is transformed to the visual order of characters <IMatra Ka Halant Ma Ra Halant>, then to the visual order of GIds <IMatraGId KaGId HalantGId MaGId RaGId HalantGId>. GSub tables will transform <KaGId HalantGId> -> <HalfKaGId>. <RaGId HalantGId> will be transformed to <rephGId>. So finally, the visual order of GIds will be <IMatraGId HalfKaGId MaGId rephGId>. This can be further beautified but is already in a readable form. It will appear as र्क्मि So no reordering is needed in the Open font for general case.
For special cases, (example <RDMI> , logical <Ra Halant Da Halant Ma IMatra>), reordering in the font is needed. Here, <DaGId HalantGId MaGId> does not reduce to <HalfDAGId MaGid> in most Hindi fonts, but remains as <DaGId HalantGId MaGId> . The visual order of Gids for the syllable is <IMatraGId DaGId HalantGId MaGId RaGId HalantGId>. It is converted to <IMatraGId DaGId HalantGId MaGId rephGId> by the font. Now the font has to reorder the IMatrGId and the rephGId over the retained HalantGId. The correct glyph sequence would be <DaGId rephGId HalantGId IMatraGId MaGId > र्द,मि (Using Gmail I have created RDMI. The halant is shown by the comma. How does one create Halant?) Comparing <RKMI> and <RDMI> we can see that font level reordering of glyphIds is needed only for <RKMI>. vinod kumar -- पृथिवी सस्यशालिनी the earth be green

