How to Get the Font Height Inherited from the Master Using Aspose.Slides for Java?

slides version: 23.1

I used portion.getPortionFormat().getFontHeight() returns Float.NaN.

How i get the font height inherited from the Master?

@Rock_Zhang,
Thank you for posting the question.

To get the final font height from a text portion format, you should use the getEffective method from the IPortionFormat interface like this:

var fontHeight = portion.getPortionFormat().getEffective().getFontHeight();

Documents: Getting Effective Font Height Value

1 Like

It solved my problem, thank you.

@Rock_Zhang,
Thank you for using Aspose.Slides.