GSUB lookup of type 5 (contextual) referring to another lookup of type 5

Adam Twardoch (List) list.adam at twardoch.com
Wed May 22 20:25:44 CEST 2013


NotoSansDevanagari-Regular.ttf (made by Monotype for Google under Apache 
2):
http://noto.googlecode.com/svn/trunk/fonts/individual/hinted/NotoSansDevanagari-Regular.ttf

has a GSUB Lookup 24 of type 5 (contextual) which in its first two 
SubClassRules refers to GSUB Lookup 60, which is also of type 5 
(contextual).

I'm normally familiar with cases where a contextual GSUB lookup refers 
to simpler lookup types (mostly LookupType 1). Nirmala or Adobe 
Devanagari don't have such constructs. Hence my question: is it valid 
and "unproblematic" that a contextual lookup refers to a contextual lookup?

Below is a TTX dump of the two lookups in question.

Many thanks in advance,
Adam

==
       <Lookup index="24">
         <LookupType value="5"/>
         <LookupFlag value="0"/>
         <!-- SubTableCount=1 -->
         <ContextSubst index="0" Format="2">
           <Coverage Format="1">
             <Glyph value="ivowelsign00deva"/>
           </Coverage>
           <ClassDef Format="2">
             <ClassDef glyph="babardeva" class="3"/>
             ...
             <ClassDef glyph="zadeva" class="2"/>
           </ClassDef>
           <!-- SubClassSetCount=40 -->
           <SubClassSet index="1">
             <!-- SubClassRuleCount=72 -->
             <SubClassRule index="0">
               <!-- GlyphCount=2 -->
               <!-- SubstCount=1 -->
               <Class index="0" value="2"/>
               <SubstLookupRecord index="0">
                 <SequenceIndex value="0"/>
                 <LookupListIndex value="60"/>
               </SubstLookupRecord>
             </SubClassRule>
             <SubClassRule index="1">
               <!-- GlyphCount=2 -->
               <!-- SubstCount=1 -->
               <Class index="0" value="3"/>
               <SubstLookupRecord index="0">
                 <SequenceIndex value="0"/>
                 <LookupListIndex value="60"/>
               </SubstLookupRecord>
             </SubClassRule>
             <SubClassRule index="2">
               <!-- GlyphCount=3 -->
               <!-- SubstCount=1 -->
               <Class index="0" value="4"/>
               <Class index="1" value="3"/>
               <SubstLookupRecord index="0">
                 <SequenceIndex value="0"/>
                 <LookupListIndex value="25"/>
               </SubstLookupRecord>
             </SubClassRule>
             ...
           </SubClassSet>
         </ContextSubst>
       </Lookup>
...
       <Lookup index="60">
         <LookupType value="5"/>
         <LookupFlag value="0"/>
         <!-- SubTableCount=1 -->
         <ContextSubst index="0" Format="2">
           <Coverage Format="1">
             <Glyph value="ivowelsign00deva"/>
           </Coverage>
           <ClassDef Format="2">
             <ClassDef glyph="babardeva" class="4"/>
             ...
             <ClassDef glyph="zadeva" class="8"/>
           </ClassDef>
           <!-- SubClassSetCount=11 -->
           <SubClassSet index="1">
             <!-- SubClassRuleCount=9 -->
             <SubClassRule index="0">
               <!-- GlyphCount=2 -->
               <!-- SubstCount=1 -->
               <Class index="0" value="2"/>
               <SubstLookupRecord index="0">
                 <SequenceIndex value="0"/>
                 <LookupListIndex value="61"/>
               </SubstLookupRecord>
             </SubClassRule>
             <SubClassRule index="1">
               <!-- GlyphCount=2 -->
               <!-- SubstCount=1 -->
               <Class index="0" value="3"/>
               <SubstLookupRecord index="0">
                 <SequenceIndex value="0"/>
                 <LookupListIndex value="62"/>
               </SubstLookupRecord>
             </SubClassRule>
             ...
           </SubClassSet>
         </ContextSubst>
       </Lookup>



-- 

May success attend your efforts,
-- Adam Twardoch
(Remove "list." from e-mail address to contact me directly.)




More information about the mpeg-otspec mailing list