public static VariationSelector[] ReadArray(BinaryReaderFont reader, uint count, long start) { VariationSelector[] array = new VariationSelector[count]; for (int i = 0; i < count; i++) { array[i] = Read(reader, start); } return(array); }
public uint FindGlyphId(int codePoint, int varSelector) { VariationSelector selector = FindVarSelector(varSelector); if (selector == null) { return(0); } NonDefaultUVS uvs = selector.nonDefaultUVS; return(uvs.FindGlyphId(codePoint)); }
public static VariationSelector Read(BinaryReaderFont reader, long start) { VariationSelector value = new VariationSelector { varSelector = reader.ReadUInt24(), defaultUVSOffset = reader.ReadUInt32(), nonDefaultUVSOffset = reader.ReadUInt32() }; long position = reader.Position; if (value.defaultUVSOffset != 0) { reader.Position = start + value.defaultUVSOffset; value.defaultUVS = DefaultUVS.Read(reader); } if (value.nonDefaultUVSOffset != 0) { reader.Position = start + value.nonDefaultUVSOffset; value.nonDefaultUVS = NonDefaultUVS.Read(reader); } reader.Position = position; return(value); }