[JAVA] Add a new Font


#1

Hello!


I have load a presentation and want to use specific font.

this:
for (int i = 0; i < pres.getFonts().size(); i++) {
System.out.println(pres.getFonts().get(i).getFontName());
}

returns:
Times New Roman
Siemens Sans
HG Mincho Light J
StarSymbol
Wingdings


what have I to do to use the arial font?


#2

by searching the forum i found this
http://www.aspose.com/Community/Forums/38945/ShowPost.aspx

hope this will work in java to


#3

FontEntity arial = new FonEntity(pres, pres.getFonts().get(0));
arial.setFontName(“Arial”);
arial.setCharSet(FontCharSet.ANSI_CHARSET);
arial.setFamily(FontFamily.DONTCARE);
arial.setPitch(FontPitch.DEFAULT_PITCH);
arial.setQuality(FontQuality.ANTIALIASED_QUALITY);
int index = pres.getFonts.add(arial);