Beispiel #1
0
 public static GlyphIdOffsetPair[] ReadArray(BinaryReaderFont reader, int count)
 {
     GlyphIdOffsetPair[] array = new GlyphIdOffsetPair[count];
     for (int i = 0; i < count; i++)
     {
         array[i] = Read(reader);
     }
     return(array);
 }
Beispiel #2
0
        public override GlyphBitmapData ReadBitmapData(BinaryReaderFont reader, int glyphId, int index)
        {
            if (index < 0 || index >= numGlyphs - 1)
            {
                return(null);
            }
            long start = reader.Position;

            reader.Position = position + index;
            GlyphIdOffsetPair offset0 = GlyphIdOffsetPair.Read(reader);
            GlyphIdOffsetPair offset1 = GlyphIdOffsetPair.Read(reader);
            int byteSize = offset1.offset - offset0.offset;

            reader.Position = start + offset0.offset;
            return(GlyphBitmapData.Read(
                       reader,
                       header.imageFormat,
                       byteSize
                       ));
        }