Exemple #1
0
        public static GlyphHeader Read(BinaryReader reader)
        {
            var instance = new GlyphHeader
            {
                NumberOfContours = reader.ReadInt16BigEndian(),
                XMin             = reader.ReadInt16BigEndian(),
                YMin             = reader.ReadInt16BigEndian(),
                XMax             = reader.ReadInt16BigEndian(),
                YMax             = reader.ReadInt16BigEndian()
            };

            return(instance);
        }
Exemple #2
0
        public static Glyph Read(BinaryReader reader)
        {
            var glyph = new Glyph
            {
                Header = GlyphHeader.Read(reader)
            };

            if (glyph.Header.NumberOfContours >= 0)
            {
                glyph.SimpleGlyph = SimpleGlyph.Read(reader, glyph.Header.NumberOfContours);
            }

            return(glyph);
        }