示例#1
0
 public static GlyphDescription Read(BinaryReaderFont reader, Glyph glyph)
 {
     if (glyph.numberOfContours >= 0)
     {
         return(SimpleGlyph.Read(reader, glyph));
     }
     return(CompositeGlyph.Read(reader, glyph));
 }
示例#2
0
        public static new CompositeGlyph Read(BinaryReaderFont reader, Glyph glyph)
        {
            CompositeGlyph value = new CompositeGlyph {
                flags      = reader.ReadUInt16(),
                glyphIndex = reader.ReadUInt16()
            };

            return(value);
        }
示例#3
0
        public static Glyph Read(BinaryReaderFont reader)
        {
            Glyph value = new Glyph {
                numberOfContours = reader.ReadInt16(),
                xMin             = reader.ReadInt16(),
                yMin             = reader.ReadInt16(),
                xMax             = reader.ReadInt16(),
                yMax             = reader.ReadInt16()
            };

            if (value.numberOfContours >= 0)
            {
                value.simpleGlyph = SimpleGlyph.Read(reader, value);
            }
            else
            {
                value.compositeGlyph = CompositeGlyph.Read(reader, value);
            }
            return(value);
        }