예제 #1
0
 protected internal virtual void FillNamedEncoding() {
     PdfEncodings.ConvertToBytes(" ", baseEncoding);
     // check if the encoding exists
     bool stdEncoding = PdfEncodings.WINANSI.Equals(baseEncoding) || PdfEncodings.MACROMAN.Equals(baseEncoding);
     if (!stdEncoding && differences == null) {
         differences = new String[256];
     }
     byte[] b = new byte[256];
     for (int k = 0; k < 256; ++k) {
         b[k] = (byte)k;
     }
     String str = PdfEncodings.ConvertToString(b, baseEncoding);
     char[] encoded = str.ToCharArray();
     for (int ch = 0; ch < 256; ++ch) {
         char uni = encoded[ch];
         String name = AdobeGlyphList.UnicodeToName(uni);
         if (name == null) {
             name = FontConstants.notdef;
         }
         else {
             unicodeToCode.Put(uni, ch);
             codeToUnicode[ch] = (int)uni;
             unicodeDifferences.Put(uni, uni);
         }
         if (differences != null) {
             differences[ch] = name;
         }
     }
 }
예제 #2
0
 protected internal virtual void WriteFontString(String s)
 {
     byte[] b = PdfEncodings.ConvertToBytes(s, PdfEncodings.WINANSI);
     Array.Copy(b, 0, outFont, fontPtr, b.Length);
     fontPtr += b.Length;
 }
예제 #3
0
 private void WriteFontString(String s)
 {
     byte[] b = PdfEncodings.ConvertToBytes(s, PdfEncodings.WINANSI);
     Array.Copy(b, 0, outFont, fontPtr, b.Length);
     fontPtr += b.Length;
 }