예제 #1
0
 /**
  * <summary>Reads a string from the font file using the specified encoding.</summary>
  */
 private string ReadString(
     int length,
     text::Encoding encoding
     )
 {
     byte[] data = new byte[length];
     FontData.Read(data, 0, length);
     return(encoding.GetString(data));
 }
예제 #2
0
 public void Read(
     byte[] data,
     int offset,
     int length
     )
 {
     while (length > 0)
     {
         EnsureStream();
         int readLength = Math.Min(length, (int)(stream.Length - stream.Position));
         stream.Read(data, offset, readLength);
         offset += readLength;
         length -= readLength;
     }
 }