public static LookupSubTable Load(BigEndianBinaryReader reader, long offset, LookupFlags lookupFlags) { reader.Seek(offset, SeekOrigin.Begin); ushort format = reader.ReadUInt16(); return(format switch { 1 => LookupType4Format1SubTable.Load(reader, offset, lookupFlags), _ => throw new InvalidFontFileException($"Invalid MarkBasePos table format {format}, only format '1' is supported.") });
public static LookupSubTable Load(BigEndianBinaryReader reader, long offset, LookupFlags lookupFlags) { reader.Seek(offset, SeekOrigin.Begin); ushort substFormat = reader.ReadUInt16(); return(substFormat switch { 1 => LookupType4Format1SubTable.Load(reader, offset, lookupFlags), _ => throw new InvalidFontFileException($"Invalid value for 'substFormat' {substFormat}. Should be '1'."), });