public static GlyphBitmapData5 Read(BinaryReaderFont reader, int byteSize) { GlyphBitmapData5 value = new GlyphBitmapData5(); value.imageData = reader.ReadBytes(byteSize); 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); }
protected static void DrawBitmapData5(RendererContext context, BitmapSize size, GlyphBitmapData5 data) { //Console.WriteLine("data5: {0}", data5); BigGlyphMetrics bigMetrics = null; IndexSubTableArray subTable = size.FindSubTableArray(context.GlyphId); if (subTable != null) { //Console.WriteLine("Size 2: {0}", context.GlyphId); //Console.WriteLine("Size 3: {0}", subTable); bigMetrics = subTable.GetBigGlyphMetrics(); //Console.WriteLine("Size 4: {0}", metrics); } if (bigMetrics != null) { DrawImageData( context, size.bitDepth, bigMetrics, data.imageData ); } else { DrawImageData( context, size.bitDepth, size.hori.widthMax, context.FontSize, data.imageData ); context.X += context.FontSize; } }