Exemplo n.º 1
0
        // Not used. This value should be equal to glyph count in Coverage.
        // Keeping it for future reference
        //private ushort AlternateSetCount(FontTable Table)
        //{
        //    return Table.GetUShort(offset + offsetAlternateSetCount);
        //}

        private AlternateSetTable AlternateSet(FontTable Table, int index)
        {
            return(new AlternateSetTable(offset +
                                         Table.GetUShort(offset +
                                                         offsetAlternateSets +
                                                         index * sizeAlternateSetOffset)
                                         ));
        }
Exemplo n.º 2
0
        // Not used. This value should be equal to glyph count in Coverage.
        // Keeping it for future reference
        //private ushort SequenceCount(FontTable Table)
        //{
        //    return Table.GetUShort(offset + offsetSequenceCount);
        //}

        private MultipleSubstitutionSequenceTable Sequence(FontTable Table, int Index)
        {
            return(new MultipleSubstitutionSequenceTable(
                       offset +
                       Table.GetUShort(offset +
                                       offsetSequenceArray +
                                       Index * sizeSequenceOffset)
                       ));
        }
Exemplo n.º 3
0
            public ushort Alternate(FontTable Table, uint FeatureParam)
            {
                Invariant.Assert(FeatureParam > 0); // Parameter 0 means feautre is disabled.
                //Should be filtered out in GetNextEnabledGlyphRange

                // Off by one - alternate number 1 is stored under index 0
                uint index = FeatureParam - 1;

                if (index >= GlyphCount(Table))
                {
                    return(AlternateSubstitutionSubtable.InvalidAlternateGlyph);
                }

                return(Table.GetUShort(offset + offsetGlyphs + (ushort)index * sizeGlyph));
            }
Exemplo n.º 4
0
 private LigatureSetTable LigatureSet(FontTable Table, ushort Index)
 {
     return new LigatureSetTable(offset+Table.GetUShort(offset+
                                                        offsetLigatureSetArray + 
                                                        Index * sizeLigatureSet));
 }
Exemplo n.º 5
0
 public LigatureTable Ligature(FontTable Table, ushort Index)
 {
     return new LigatureTable(offset + Table.GetUShort(offset + 
         offsetLigatureArray + 
         Index * sizeLigatureOffset));
 }
Exemplo n.º 6
0
 public LigatureTable Ligature(FontTable Table, ushort Index)
 {
     return(new LigatureTable(offset + Table.GetUShort(offset +
                                                       offsetLigatureArray +
                                                       Index * sizeLigatureOffset)));
 }
Exemplo n.º 7
0
        public CoverageChainingSubtable(FontTable Table, int Offset)
        { 
            offset = Offset;
            offsetInputGlyphCount = offsetBacktrackGlyphCount + sizeGlyphCount + 
                                      Table.GetUShort(offset+offsetBacktrackGlyphCount) * 
                                                                    sizeCoverageOffset;
 
            offsetLookaheadGlyphCount = offsetInputGlyphCount + sizeGlyphCount +
                                          Table.GetUShort(offset+offsetInputGlyphCount) *
                                                                   sizeCoverageOffset;
        } 
Exemplo n.º 8
0
 public ushort GlyphCount(FontTable Table)
 {
     return Table.GetUShort(offset + offsetGlyphCount);
 }
Exemplo n.º 9
0
 public static ushort GlyphCount(FontTable Table, int Offset) 
 {
     return Table.GetUShort(Offset); 
 }
Exemplo n.º 10
0
 // Not used. This value should be equal to glyph count in Coverage.
 // Keeping it for future reference
 //private ushort Foramt2GlyphCount(FontTable Table)
 //{
 //    Debug.Assert(Format(Table)==2);
 //    return Table.GetUShort(offset + offsetFormat2GlyphCount);
 //}
 private ushort Format2SubstituteGlyphId(FontTable Table, ushort Index)
 {
     Invariant.Assert(Format(Table) == 2);
     return(Table.GetUShort(offset + offsetFormat2SubstitutehArray +
                            Index * sizeFormat2SubstituteSize));
 }
Exemplo n.º 11
0
 public ushort Format(FontTable Table)
 {
     return Table.GetUShort(offset + offsetFormat);
 }
Exemplo n.º 12
0
 public ushort Glyph(FontTable Table, ushort index)
 {
     return(Table.GetUShort(offset + offsetGlyphArray + index * sizeGlyphId));
 }
Exemplo n.º 13
0
 private LigatureSetTable LigatureSet(FontTable Table, ushort Index)
 {
     return(new LigatureSetTable(offset + Table.GetUShort(offset +
                                                          offsetLigatureSetArray +
                                                          Index * sizeLigatureSet)));
 }
Exemplo n.º 14
0
 public ushort Component(FontTable Table, ushort Index)
 {
     //LigaTable includes comps from 1 to N. So, (Index-1)
     return(Table.GetUShort(offset + offsetComponentArray +
                            (Index - 1) * sizeComponent));
 }
Exemplo n.º 15
0
 public ushort ComponentCount(FontTable Table)
 {
     return(Table.GetUShort(offset + offsetComponentCount));
 }
Exemplo n.º 16
0
 public ushort LigatureGlyph(FontTable Table)
 {
     return(Table.GetUShort(offset + offsetLigatureGlyph));
 }
Exemplo n.º 17
0
 public ushort ComponentCount(FontTable Table)
 {
     return Table.GetUShort(offset + offsetComponentCount);
 }
Exemplo n.º 18
0
 public ushort Format(FontTable Table)
 {
     return(Table.GetUShort(offset + offsetFormat));
 }
Exemplo n.º 19
0
 public ushort Glyph(FontTable Table, ushort index)
 {
     return Table.GetUShort(offset + offsetGlyphArray + index * sizeGlyphId);
 }
Exemplo n.º 20
0
 private CoverageTable Coverage(FontTable Table)
 {
     return(new CoverageTable(offset + Table.GetUShort(offset + offsetCoverage)));
 }
Exemplo n.º 21
0
 // Not used. This value should be equal to glyph count in Coverage.
 // Keeping it for future reference
 //private ushort Foramt2GlyphCount(FontTable Table)
 //{
 //    Debug.Assert(Format(Table)==2);
 //    return Table.GetUShort(offset + offsetFormat2GlyphCount);
 //}       
 private ushort Format2SubstituteGlyphId(FontTable Table,ushort Index)
 {
     Invariant.Assert(Format(Table)==2);
     return Table.GetUShort(offset + offsetFormat2SubstitutehArray + 
                                     Index * sizeFormat2SubstituteSize);
 }
Exemplo n.º 22
0
 public ContextualLookupRecords ContextualLookups(FontTable Table, int CurrentOffset)
 { 
     return new ContextualLookupRecords(CurrentOffset + sizeCount,
         Table.GetUShort(CurrentOffset));
 }
Exemplo n.º 23
0
 private ushort LigatureSetCount(FontTable Table)
 {
     return(Table.GetUShort(offset + offsetLigatureSetCount));
 }
Exemplo n.º 24
0
 public CoverageTable LookaheadCoverage(FontTable Table, ushort Index)
 { 
     return new CoverageTable(offset +
                                 Table.GetUShort(offset+ 
                                                 offsetLookaheadGlyphCount + 
                                                 sizeGlyphCount +
                                                 Index*sizeCoverageOffset) 
                             );
 }
Exemplo n.º 25
0
 public static ushort ClassId(FontTable Table, int Offset)
 { 
     return Table.GetUShort(Offset);
 } 
Exemplo n.º 26
0
 public ushort LigatureCount(FontTable Table)
 {
     return(Table.GetUShort(offset + offsetLigatureCount));
 }
Exemplo n.º 27
0
 public CoverageTable BacktrackCoverage(FontTable Table, ushort Index) 
 {
     return new CoverageTable(offset +
                                 Table.GetUShort(offset+
                                                 offsetBacktrackGlyphCount + 
                                                 sizeGlyphCount +
                                                 Index*sizeCoverageOffset) 
                             ); 
 }
Exemplo n.º 28
0
 public ushort GlyphCount(FontTable Table)
 {
     return(Table.GetUShort(offset + offsetGlyphCount));
 }
Exemplo n.º 29
0
 public ContextualLookupRecords ContextualLookups(FontTable Table) 
 {
     int recordCountOffset = offset + offsetLookaheadGlyphCount + sizeGlyphCount + 
                             LookaheadGlyphCount(Table) * sizeCoverageOffset; 
     return new ContextualLookupRecords(recordCountOffset+sizeGlyphCount,
                                         Table.GetUShort(recordCountOffset)); 
 }
Exemplo n.º 30
0
 private ushort LookupIndex(FontTable Table, ushort Index)
 { 
     return Table.GetUShort(offset + Index*sizeLookupRecord + offsetLookupIndex);
 }
Exemplo n.º 31
0
 private ushort LigatureSetCount(FontTable Table)
 {
     return Table.GetUShort(offset + offsetLigatureSetCount);
 }
Exemplo n.º 32
0
 private ClassDefTable BacktrackClassDef(FontTable Table)
 {
     return new ClassDefTable(offset + 
                                 Table.GetUShort(offset +
                                                 offsetBacktrackClassDef) 
                             ); 
 }
Exemplo n.º 33
0
 public ushort LigatureCount(FontTable Table)
 {
     return Table.GetUShort(offset + offsetLigatureCount);
 }
Exemplo n.º 34
0
 private ClassDefTable InputClassDef(FontTable Table)
 {
     return new ClassDefTable(offset +
                                 Table.GetUShort(offset + 
                                                 offsetInputClassDef)
                             ); 
 } 
Exemplo n.º 35
0
 public ushort LigatureGlyph(FontTable Table)
 {
     return Table.GetUShort(offset + offsetLigatureGlyph);
 }
Exemplo n.º 36
0
 private ClassDefTable LookaheadClassDef(FontTable Table) 
 {
     return new ClassDefTable(offset +
                                 Table.GetUShort(offset +
                                                 offsetLookaheadClassDef) 
                             );
 } 
Exemplo n.º 37
0
 public ushort Component(FontTable Table, ushort Index)
 {
     //LigaTable includes comps from 1 to N. So, (Index-1)
     return Table.GetUShort(offset + offsetComponentArray +
         (Index-1) * sizeComponent);
 }
Exemplo n.º 38
0
 private ushort ClassSetCount(FontTable Table)
 { 
     return Table.GetUShort(offset + offsetSubClassSetCount);
 }
Exemplo n.º 39
0
 // Not used. This value should be equal to glyph count in Coverage.
 // Keeping it for future reference
 //private ushort SequenceCount(FontTable Table)
 //{
 //    return Table.GetUShort(offset + offsetSequenceCount);
 //}
 
 private MultipleSubstitutionSequenceTable Sequence(FontTable Table, int Index)
 {
     return new MultipleSubstitutionSequenceTable(
                                 offset + 
                                 Table.GetUShort(offset +
                                                 offsetSequenceArray +
                                                 Index * sizeSequenceOffset)
                                );
 }
Exemplo n.º 40
0
 private SubClassSet ClassSet(FontTable Table, ushort Index) 
 {
     int ClassSetOffset = Table.GetUShort(offset + offsetSubClassSetArray + 
                                          Index * sizeClassSetOffset); 
     if (ClassSetOffset==0)
         return new SubClassSet(FontTable.InvalidOffset); 
     else
         return new SubClassSet(offset + ClassSetOffset);
 }
Exemplo n.º 41
0
 private CoverageTable Coverage(FontTable Table)
 {
     return new CoverageTable(offset + Table.GetUShort(offset + offsetCoverage));
 }
Exemplo n.º 42
0
 public ushort RuleCount(FontTable Table)
 { 
     return Table.GetUShort(offset+offsetRuleCount);
 }
Exemplo n.º 43
0
 // Not used. This value should be equal to glyph count in Coverage.
 // Keeping it for future reference
 //private ushort AlternateSetCount(FontTable Table)
 //{
 //    return Table.GetUShort(offset + offsetAlternateSetCount);
 //}
 
 private AlternateSetTable AlternateSet(FontTable Table, int index)
 {
     return new AlternateSetTable(offset + 
                                  Table.GetUShort(offset + 
                                                  offsetAlternateSets +
                                                  index * sizeAlternateSetOffset)
                                 );
 }
Exemplo n.º 44
0
 public SubClassRule Rule(FontTable Table, ushort Index) 
 {
     return new SubClassRule(offset + Table.GetUShort(offset + offsetRuleArray + 
                                                       Index*sizeRuleOffset)); 
 }
Exemplo n.º 45
0
            public ushort Alternate(FontTable Table, uint FeatureParam)
            {
                Invariant.Assert(FeatureParam > 0); // Parameter 0 means feautre is disabled.
                                                //Should be filtered out in GetNextEnabledGlyphRange

                // Off by one - alternate number 1 is stored under index 0
                uint index = FeatureParam - 1;
                
                if (index >= GlyphCount(Table)) 
                {
                    return AlternateSubstitutionSubtable.InvalidAlternateGlyph;
                }
                
                return Table.GetUShort(offset + offsetGlyphs + (ushort)index*sizeGlyph);
            }
 private ushort Format(FontTable Table)
 {
     return Table.GetUShort(offset + offsetFormat);
 }