예제 #1
0
        private void InitFontSize()
        {
            String mainTag = raf.ReadString(4, PdfEncodings.WINANSI);

            if (!mainTag.Equals("ttcf"))
            {
                throw new iText.IO.IOException(iText.IO.IOException.InvalidTtcFile);
            }
            raf.SkipBytes(4);
            TTCSize = raf.ReadInt();
        }
예제 #2
0
        /// <exception cref="System.IO.IOException"/>
        protected internal virtual TagAndLocation[] ReadTagAndLocations(int baseLocation)
        {
            int count = rf.ReadUnsignedShort();

            TagAndLocation[] tagslLocs = new TagAndLocation[count];
            for (int k = 0; k < count; ++k)
            {
                TagAndLocation tl = new TagAndLocation();
                tl.tag       = rf.ReadString(4, "utf-8");
                tl.location  = rf.ReadUnsignedShort() + baseLocation;
                tagslLocs[k] = tl;
            }
            return(tagslLocs);
        }
예제 #3
0
 /// <summary>
 /// Reads a <c>String</c> from the font file as bytes using the Cp1252
 /// encoding.
 /// </summary>
 /// <param name="length">the length of bytes to read</param>
 /// <returns>the <c>String</c> read</returns>
 private String ReadStandardString(int length)
 {
     return(raf.ReadString(length, PdfEncodings.WINANSI));
 }