Beispiel #1
0
 public static GlyphDescription Read(BinaryReaderFont reader, Glyph glyph)
 {
     if (glyph.numberOfContours >= 0)
     {
         return(SimpleGlyph.Read(reader, glyph));
     }
     return(CompositeGlyph.Read(reader, glyph));
 }
Beispiel #2
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);
        }