FontsLoader 14.4

Hi,


I have run into problems while migrating a program from Aspose Slides 8.6 to 14.4. I can’t get custom fonts loaded with the FontsLoader class. This works well in 8.6.

Here is some example code:

package test;
import com.aspose.slides.FontData;
import com.aspose.slides.FontsLoader;
import com.aspose.slides.IAutoShape;
import com.aspose.slides.IPortion;
import com.aspose.slides.ISlide;
import com.aspose.slides.ITextFrame;
import com.aspose.slides.Presentation;
import com.aspose.slides.SaveFormat;
import com.aspose.slides.ShapeType;

public
class Create14 {
public static void main(String[] args) {

FontsLoader.
loadExternalFonts(new String[ {"/custom_fonts/"});

Presentation pres = new Presentation();
ISlide sld = pres.getSlides().get_Item(0);
IAutoShape ashp = sld.getShapes().addAutoShape(ShapeType.Rectangle, 50, 50, 200, 50);
ITextFrame tf = ashp.getTextFrame();
tf.setText(“Test Text”);

IPortion port = tf.getParagraphs().get_Item(0).getPortions().get_Item(0);
port.getPortionFormat().setLatinFont(new FontData(“Blazed”));
port.getPortionFormat().setFontHeight(25);

pres.save(“test.pdf”, SaveFormat.Pdf);
}
}


The test text is writen some default font instead of the specified font.

Do i use the API the wrong way, or is there a bug lurking here?

Regards,
Henrik Arvidson

Hi Henrik,

Thank you for the details.

I would request you to share the fonts you are using at your end and the generated presentation file with us to further test the issue. We will check it and get back to you.

Thanks & Regards,

Thanks for the quick reply.


The attached zip archive contains
Blazed.ttf: font used in examples
Create14.java: code using Slides 14.4
Create14.pdf: result generated with Slides 14.4
Create86.java: code using Slides 8.6
Create86.pdf: result generated with Slides 8.6

I noticed this problem with other fonts as well.

Regards,
Henrik Arvidson

Hi Henrik,

Thank you for sharing the sample file.

I am able to reproduce your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: SLIDESJAVA-34428. You will be notified via this forum thread once the issue gets resolved.

Thanks & Regards,

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


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