Examples of addFont()


Examples of org.apache.fop.pdf.PDFResources.addFont()

            Font font = (Font)fonts.get(f);
            FontDescriptor desc = null;
            if (font instanceof FontDescriptor) {
                desc = (FontDescriptor)font;
            }
            resources.addFont(doc.makeFont(f, font.fontName(),
                                           font.encoding(), font, desc));
        }
    }

}
View Full Code Here

Examples of org.apache.fop.pdf.PDFResources.addFont()

        Font font = (Font)fonts.get(f);
        FontDescriptor desc = null;
        if (font instanceof FontDescriptor) {
            desc = (FontDescriptor)font;
        }
        resources.addFont(doc.makeFont(f,
                       font.fontName(),
                       font.encoding(),
                       font,
                       desc
                       )
View Full Code Here

Examples of org.apache.fop.pdf.PDFResources.addFont()

  Hashtable fonts = fontInfo.getFonts();
  Enumeration e = fonts.keys();
  PDFResources resources = doc.getResources();
  while (e.hasMoreElements()) {
      String f = (String) e.nextElement();
      resources.addFont(doc.makeFont(f,
             ((Font)
              fonts.get(f)).fontName(),
             ((Font)
              fonts.get(f)).encoding()
             )
View Full Code Here

Examples of org.apache.fop.pdf.PDFResources.addFont()

  Hashtable fonts = fontInfo.getFonts();
  Enumeration e = fonts.keys();
  PDFResources resources = doc.getResources();
  while (e.hasMoreElements()) {
      String f = (String) e.nextElement();
      resources.addFont(doc.makeFont(f,
             ((Font)
              fonts.get(f)).fontName(),
             ((Font)
              fonts.get(f)).encoding()
             )
View Full Code Here

Examples of org.apache.poi.hslf.record.FontCollection.addFont()

   */
  public int addFont(PPFont font) {
    FontCollection fonts = getDocumentRecord().getEnvironment().getFontCollection();
    int idx = fonts.getFontIndex(font.getFontName());
    if (idx == -1) {
      idx = fonts.addFont(font.getFontName(), font.getCharSet(), font.getFontFlags(), font
          .getFontType(), font.getPitchAndFamily());
    }
    return idx;
  }

View Full Code Here

Examples of org.apache.poi.hslf.usermodel.SlideShow.addFont()

        SlideShow ppt = new SlideShow();
        assertEquals(1, ppt.getNumberOfFonts());
        assertEquals("Arial", ppt.getFont(0).getFontName());

        //adding the same font twice
        assertEquals(0, ppt.addFont(PPFont.ARIAL));
        assertEquals(1, ppt.getNumberOfFonts());

        assertEquals(1, ppt.addFont(PPFont.TIMES_NEW_ROMAN));
        assertEquals(2, ppt.addFont(PPFont.COURIER_NEW));
        assertEquals(3, ppt.addFont(PPFont.WINGDINGS));
View Full Code Here

Examples of org.apache.poi.hslf.usermodel.SlideShow.addFont()

        //adding the same font twice
        assertEquals(0, ppt.addFont(PPFont.ARIAL));
        assertEquals(1, ppt.getNumberOfFonts());

        assertEquals(1, ppt.addFont(PPFont.TIMES_NEW_ROMAN));
        assertEquals(2, ppt.addFont(PPFont.COURIER_NEW));
        assertEquals(3, ppt.addFont(PPFont.WINGDINGS));

        assertEquals(4, ppt.getNumberOfFonts());
View Full Code Here

Examples of org.apache.poi.hslf.usermodel.SlideShow.addFont()

        //adding the same font twice
        assertEquals(0, ppt.addFont(PPFont.ARIAL));
        assertEquals(1, ppt.getNumberOfFonts());

        assertEquals(1, ppt.addFont(PPFont.TIMES_NEW_ROMAN));
        assertEquals(2, ppt.addFont(PPFont.COURIER_NEW));
        assertEquals(3, ppt.addFont(PPFont.WINGDINGS));

        assertEquals(4, ppt.getNumberOfFonts());

        assertEquals(PPFont.TIMES_NEW_ROMAN.getFontName(), ppt.getFont(1).getFontName());
View Full Code Here

Examples of org.apache.poi.hslf.usermodel.SlideShow.addFont()

        assertEquals(0, ppt.addFont(PPFont.ARIAL));
        assertEquals(1, ppt.getNumberOfFonts());

        assertEquals(1, ppt.addFont(PPFont.TIMES_NEW_ROMAN));
        assertEquals(2, ppt.addFont(PPFont.COURIER_NEW));
        assertEquals(3, ppt.addFont(PPFont.WINGDINGS));

        assertEquals(4, ppt.getNumberOfFonts());

        assertEquals(PPFont.TIMES_NEW_ROMAN.getFontName(), ppt.getFont(1).getFontName());
        assertEquals(PPFont.COURIER_NEW.getFontName(), ppt.getFont(2).getFontName());
View Full Code Here

Examples of org.apache.poi.hslf.usermodel.SlideShow.addFont()

        SlideShow ppt = new SlideShow();
        assertEquals(1, ppt.getNumberOfFonts());
        assertEquals("Arial", ppt.getFont(0).getFontName());

        //adding the same font twice
        assertEquals(0, ppt.addFont(PPFont.ARIAL));
        assertEquals(1, ppt.getNumberOfFonts());

        assertEquals(1, ppt.addFont(PPFont.TIMES_NEW_ROMAN));
        assertEquals(2, ppt.addFont(PPFont.COURIER_NEW));
        assertEquals(3, ppt.addFont(PPFont.WINGDINGS));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.