public void Load(FontParser parser){ int start=parser.Position; // Table type: parser.ReadUInt16(); parser.ReadUInt16(); int count=parser.ReadUInt16(); // create the set: Substitutions=new Dictionary<int,List<LigatureSubstitution>>(); // For each one.. for(int i=0;i<count;i++){ // Get the offset: int offset=parser.ReadUInt16(); // Create the substitution entry: LigatureSubstitution substitution=new LigatureSubstitution(); // Get the current position: int position=parser.Position; // Hop there: parser.Position=start+offset; // Load it: substitution.Load(parser); // Go back: parser.Position=position; } // Extra flags: parser.ReadUInt16(); }
public void Load(FontParser parser) { int start = parser.Position; // Table type: parser.ReadUInt16(); parser.ReadUInt16(); int count = parser.ReadUInt16(); // create the set: Substitutions = new Dictionary <int, List <LigatureSubstitution> >(); // For each one.. for (int i = 0; i < count; i++) { // Get the offset: int offset = parser.ReadUInt16(); // Create the substitution entry: LigatureSubstitution substitution = new LigatureSubstitution(); // Get the current position: int position = parser.Position; // Hop there: parser.Position = start + offset; // Load it: substitution.Load(parser); // Go back: parser.Position = position; } // Extra flags: parser.ReadUInt16(); }