private LanguageRecord ReadLanguageRecord(TagAndLocation tagLoc) { LanguageRecord rec = new LanguageRecord(); //skip lookup order openTypeReader.rf.Seek(tagLoc.location + 2); rec.featureRequired = openTypeReader.rf.ReadUnsignedShort(); int count = openTypeReader.rf.ReadUnsignedShort(); rec.features = openTypeReader.ReadUShortArray(count); rec.tag = tagLoc.tag; return(rec); }
public OpenTypeFeature(OpenTypeFontTableReader openTypeReader, int locationFeatureTable) { this.openTypeReader = openTypeReader; records = new List <FeatureRecord>(); openTypeReader.rf.Seek(locationFeatureTable); TagAndLocation[] tagsLocs = openTypeReader.ReadTagAndLocations(locationFeatureTable); foreach (TagAndLocation tagLoc in tagsLocs) { // +2 don't use FeatureParams openTypeReader.rf.Seek(tagLoc.location + 2L); int lookupCount = openTypeReader.rf.ReadUnsignedShort(); FeatureRecord rec = new FeatureRecord(); rec.tag = tagLoc.tag; rec.lookups = openTypeReader.ReadUShortArray(lookupCount); records.Add(rec); } }