Changing font family and displaying percentage sign in graphs

Hello, I am using the Aspose Slides for Java and I experience the following problems:

  1. Displaying the “%” sign after the Data Labels and Axis values in any of the bar charts I use.

When using the following code:

series.getLabels().getDefaultDataLabelFormat().setShowValue(true);
series.getLabels().getDefaultDataLabelFormat().setNumberFormat(“0.0%”);

The “%” sign is displayed only if the ppt file is viewed with Libre Office, but I could never get them to show in any version of Microsoft office.

Example: In Libre office I get 85% and in MS Office the labels show 0.85

  1. Changing the font family for all text in a ppt presentation

I am using the following code to do that, however nothing changes:

IFontData destFont = new FontData(“Verdana”);

    for (IFontData font : pres.getFontsManager().getEmbeddedFonts()) {
        pres.getFontsManager().replaceFont(font, destFont);
    }

Can you please advise on these two. Maybe I am missing something.

Thanks!

@d.dimitrov

The sample code for font replacement is fine. However, in order to proceed further with issue investigation on our end, I need source file, generated presentation, preview snapshot of office versions where things are working fine and where things are failing. Please also share the Java and Operating System details with us. I am also assuming that you are using latest Aspose.Slides for Java 20.11 on your end.