Aspose.slide getFontHeight() provide NaN output

I have written below code.

//Create an instance of Presentation class
Presentation pres = new Presentation();

//Get reference of a slide
ISlide slide = pres.getSlides().get_Item(0);
//Add an AutoShape of Rectangle type
IAutoShape ashp = slide.getShapes().addAutoShape(ShapeType.Rectangle, 150, 75, 400, 300);
ashp.getFillFormat().setFillType(FillType.NoFill);
//Add TextFrame to the Rectangle
ashp.addTextFrame(“Aspose TextBox”);
IPortion port = ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0);
IPortionFormat pf = port.getPortionFormat();
pf.setFontHeight(50);

System.out.println(pf.getFontHeight());

After Runt it is print font size NaN same issue I face with many slide.

Please Help me.

Thanks
Vishal

@guvishal,

I have worked with source code shared by you using Aspose.Slides for Java 19.4 and unable to observe any issue. Can you please share which Aspose.Slides version you are using on your end along with environment details so that we may further investigate to help you out.

I’m using same version. I have attached the slide. in which I try to read font size.

4.012.001 Tiered Benefit Plans Detail Deck.pptx.zip (122.2 KB)

please try to read font size it is show me NaN.

I’m using AWS Lambda for run the code.

@guvishal,

I have observed your comments. An issue with ID SLIDESJAVA-37645 has been created in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@guvishal,

I like to inform that we have investigated this issue on our end and can’t reproduce this issue. Can you please check the permissions and the availability of fonts for the java process and try FontsLoader?

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