示例#1
0
        /// <summary>
        /// One per glyph, sorted by glyph ID.
        /// </summary>
        //public ushort[] glyphIdArray;

        public static IndexSubTable5 Read(BinaryReaderFont reader)
        {
            IndexSubTable5 value = new IndexSubTable5();

            value.header     = IndexSubHeader.Read(reader);
            value.imageSize  = reader.ReadUInt32();
            value.bigMetrics = BigGlyphMetrics.Read(reader);
            value.numGlyphs  = reader.ReadUInt32();
            value.position   = reader.Position;
            //value.glyphIdArray = reader.ReadUInt16Array((int)value.numGlyphs);
            return(value);
        }
示例#2
0
        //protected string filePath;

        public static IndexSubTable Read(BinaryReaderFont reader, ushort firstGlyphIndex, ushort lastGlyphIndex)
        {
            ushort format = reader.PeekUInt16();

            switch (format)
            {
            case 1:
                return(IndexSubTable1.Read(reader, lastGlyphIndex - firstGlyphIndex + 1));

            case 2:
                return(IndexSubTable2.Read(reader));

            case 3:
                return(IndexSubTable3.Read(reader, lastGlyphIndex - firstGlyphIndex + 1));

            case 4:
                return(IndexSubTable4.Read(reader));

            case 5:
                return(IndexSubTable5.Read(reader));
            }
            return(null);
        }