code: byte[] convertToBytes(String text) {
          if (directTextToByte)
              return PdfEncodings.convertToBytes(text, null);
          if (specialMap != null) {
              byte[] b = new byte[text.length()];
              int ptr = 0;
              int length = text.length();
              for (int k = 0; k < length; ++k) {
                  char c = text.charAt(k);
                  if (specialMap.containsKey(c))
                      b[ptr++] = (byte)specialMap.get(c);
              }
              if (ptr < length) {
                  byte[] b2 = new byte[ptr];
                  System.arraycopy(b, 0, b2, 0, ptr);
                  return b2;
              }
              else
                  return b;
          }
          return PdfEncodings.convertToBytes(text, encoding);
      }
docs: Converts a <CODE>String</CODE> to a </CODE>byte</CODE> array according
  to the font's encoding.
  @param text the <CODE>String</CODE> to be converted
  @return an array of <CODE>byte</CODE> representing the conversion according to the font's encoding