예제 #1
0
 public override GlyphBitmapData ReadBitmapData(BinaryReaderFont reader, int glyphId, int index)
 {
     reader.Position += imageSize * index;
     return(GlyphBitmapData.Read(
                reader,
                header.imageFormat,
                (int)imageSize
                ));
 }
예제 #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
                       ));
        }
예제 #3
0
        public override GlyphBitmapData ReadBitmapData(BinaryReaderFont reader, int glyphId, int index)
        {
            if (index < 0 || index >= count - 1)
            {
                return(null);
            }
            long start = reader.Position;

            reader.Position = position + index;
            uint offset0  = reader.ReadUInt32();
            uint offset1  = reader.ReadUInt32();
            uint byteSize = offset1 - offset0;

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