public static GlyphBitmapData8 Read(BinaryReaderFont reader) { GlyphBitmapData8 value = new GlyphBitmapData8 { smallMetrics = SmallGlyphMetrics.Read(reader), pad = reader.ReadByte(), numComponents = reader.ReadUInt16() }; value.components = EbdtComponent.ReadArray(reader, value.numComponents); return(value); }
public static GlyphBitmapData Read(BinaryReaderFont reader, ushort imageFormat, int byteSize) { switch (imageFormat) { case 1: return(GlyphBitmapData1.Read(reader, byteSize)); case 2: return(GlyphBitmapData2.Read(reader, byteSize)); case 5: return(GlyphBitmapData5.Read(reader, byteSize)); case 6: return(GlyphBitmapData6.Read(reader, byteSize)); case 7: return(GlyphBitmapData7.Read(reader, byteSize)); case 8: return(GlyphBitmapData8.Read(reader)); case 9: return(GlyphBitmapData9.Read(reader)); case 17: return(GlyphBitmapData17.Read(reader)); case 18: return(GlyphBitmapData18.Read(reader)); case 19: return(GlyphBitmapData19.Read(reader)); } return(null); }