Moises
1
The following code prints correctly the font name and index.
Fonts fonts = templatePres.getFonts();
for (int i = 0; i < fonts.size(); i++) {
FontEntity fe = fonts.get(i);
System.out.println("Name="+fe.getFontName()+", index="+fe.getFontIndex());
}
Name=Arial, index=0
Name=Tahoma, index=1
But when I change Arial to Tahoma, I still see Arial in the Presentation. Could it be a bug in Aspose.Slides? Please advice.
Paragraph p = shape.getTextFrame().getParagraphs().get(0);
Portion pt = p.getPortions().get(0);
pt.setFontIndex((short) 1);
Moises
2
Do you have any comments about this issue? thanks a lot.
alcrus
3
Could you attach your ppt please?
Moises
4
Hi Alexey, before attaching the ppt files I checked once more and found out that the copied Presentation had different font indexes.
The original has:
Name=Arial, index=0
Name=Courier New, index=1
Name=Tahoma, index=2
and the copied Presentation has:
Name=Arial, index=0
Name=Arial, index=1
Name=Courier New, index=2
Name=Tahoma, index=3
I wonder why 2 Arial fonts? anyway I got the new font index, and it worked nicely.
Thanks for your help