예제 #1
0
        /// <summary>
        /// One per glyph.
        /// </summary>
        //public GlyphIdOffsetPair[] glyphArray;

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

            value.header    = IndexSubHeader.Read(reader);
            value.numGlyphs = reader.ReadUInt32();
            value.position  = reader.Position;
            //value.glyphArray = GlyphIdOffsetPair.ReadArray(reader, (int)value.numGlyphs + 1);
            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);
        }