We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

fontProblem

Hi,


I have a .ppt file who have a Portion with “Century” font name. Now, when I set this Text “Drèw” and font Index in this Portion font name in saved .ppt file is ok but when I create new Portion and set this Text and set the same font Index, in saved file font for letter “è” is not the same, there is Calibri.

this is the code how you can to check this and you have attached file:

public void pptSetFont() throws Exception {
String path = “”;
Presentation presentation = new Presentation(path);
Slide slide = presentation.getSlideByPosition(1);
Shapes shapes = slide.getShapes();
Shape shape = shapes.get(0);
TextFrame frame = shape.getTextFrame();
Paragraphs paragraphs = frame.getParagraphs();
Paragraph paragraph = paragraphs.get(0);
Portions portions = paragraph.getPortions();
Portion portion = portions.get(0);
int fontIndex = portion.getFontIndex();
Portion newPortion = new Portion();
newPortion.setText(“Drèw”);
newPortion.setFontIndex(fontIndex);
portions.add(newPortion);
portion.setText(“Drèw”);
portion.setFontIndex(fontIndex);
presentation.save("", SaveFormat.PPT);
}

Thanks,
Bojan

Hi Bojan,


I have worked with your code snippet using Aspose.Slides for Java 2.9.2 and have not been able to observe any font change issue in generated presentation. The generated presentation has “Century” font with height: 44 in generated presentation. However, the character “è” inside text Drèw” is rendered wrong in generated presentation. An issue with ID SLIDESJAVA-33301 has been created in our issue tracking system to resolve the issue. I have tested the code shared by you using Aspose.Slides for .NET 6.1.0 as well and have not observed any issue at all. We are auto porting Aspose.Slides for .NET features in Aspose.Slide for Java. When this activity will be finished the issue of wrong character rendering will also get resolved. For your kind reference, I have shared the Aspose.Slides for .NET and Java output of my end with you as well.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-33301) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi,


I executed the code from the first post with Aspose.Slides 8.3.0 and I’m still able to reproduce the issue. Character “è” is generated with different font. Take a look at the screenshot I attached.

Thanks,
Zeljko


Hi Zeljko,

I have observed your feedback that you are using Aspose.Slides for Java 8.3.0. I request you to please try using Aspose.Slides for Java 15.6.0 on your end as Aspose.Slides for Java 8.3.0 is no longer supported. If you are able to reproduce the issue using Aspose.Slides for Java 15.6.0, then please provide the working sample code, source presentation and generated output with us. I will investigate the issue further on my end to help you out.

Many Thanks,