code: void writeFont(PdfWriter writer) {
          try {
              switch (fontType) {
                  case BaseFont.FONT_TYPE_T3:
                      baseFont.writeFont(writer, indirectReference, null);
                      break;
                  case BaseFont.FONT_TYPE_T1:
                  case BaseFont.FONT_TYPE_TT: {
                      int firstChar;
                      int lastChar;
                      for (firstChar = 0; firstChar < 256; ++firstChar) {
                          if (shortTag[firstChar] != 0)
                              break;
                      }
                      for (lastChar = 255; lastChar >= firstChar; --lastChar) {
                          if (shortTag[lastChar] != 0)
                              break;
                      }
                      if (firstChar > 255) {
                          firstChar = 255;
                          lastChar = 255;
                      }
                      baseFont.writeFont(writer, indirectReference, new Object[]{Integer.valueOf(firstChar), Integer.valueOf(lastChar), shortTag, Boolean.valueOf(subset)});
                      break;
                  }
                  case BaseFont.FONT_TYPE_CJK:
                      baseFont.writeFont(writer, indirectReference, new Object[]{cjkTag});
                      break;
                  case BaseFont.FONT_TYPE_TTUNI:
                      baseFont.writeFont(writer, indirectReference, new Object[]{longTag, Boolean.valueOf(subset)});
                      break;
              }
          }
          catch(Exception e) {
              throw new ExceptionConverter(e);
          }
      }
docs: Writes the font definition to the document.
  @param writer the <CODE>PdfWriter</CODE> of this document