How to get the right font with getThumbnails?

Hi,

I’m using this to get a presentation’s thumbnails. (Using Jpype and the latest version of aspose slides java)

renderingOptions = jpype.JClass("com.aspose.slides.RenderingOptions")
pres = asposePresentation(file_location)  
thumbnails = pres.getThumbnails(renderingOptions(), scale_x, scale_y)

The font for the titles is Product Sans Regular, and I’ve installed it on the server :

root@api:~# fc-list | grep Product
/usr/share/fonts/truetype/custom-fonts/Product Sans Bold Italic.ttf: Product Sans:style=Bold Italic
/usr/share/fonts/truetype/custom-fonts/Product Sans Regular.ttf: Product Sans:style=Regular
/usr/share/fonts/truetype/custom-fonts/Product Sans Italic.ttf: Product Sans:style=Italic
/usr/share/fonts/truetype/custom-fonts/Product Sans Bold.ttf: Product Sans:style=Bold

I thought installing the right font on the server would be enough to get the right fonts showing in the thumbnails, but it doesn’t seem to be the case. So my titles are all over the place in the thumbnails. I need to be able to generate thumbnails containing any font that’s installed on the server.

Am I missing something regarding fonts when generating the thumbnails ? About embedded fonts maybe ? Or am I supposed to use LoadExternalFonts on the entire fonts folder ?

Thanks a lot

@alb1,
Thank you for the issue description. To investigate the case, please share the next data:

  • a simple standalone project that reproduces the problem
  • the Product Sans font
  • the original presentation sample
  • the thumbnail output images

Hi,

Here you go :

As shown above, the font is installed on the server
Thanks a lot !

Hi, this might be coming from my side. Looks like the docker container the script is running in might not benefits from the fonts installed system wide. I’m investigating and will let you know quickly :slight_smile:

@alb1
Sure, then we will wait to hear from you.

Confirmed the issue came from the Docker container. Thanks a lot for your quick replies !