Custom Font

Load Custom Fonts from .TTF

Aspose.Slides lets you load fonts for rendering in presentations without even installing them. This article shows how to load fonts from custom directories without installing them. Please follow the steps below to loading Fonts from external directories by using Aspose.Slides for .NET API:

  • Create an instance of FontsLoader Class and call the static method LoadExternalFonts.
  • Perform render the presentation.
  • Clear the cache in the FontsLoader Class.

The implementation of the above is given below.

Get Custom Fonts Folder

A new property has been added that returns folders where font files are searched. Those are folders that have been added with LoadExternalFonts method as well as system font folders.

Specify Custom Fonts Used With Presentation

A new DocumentLevelFontSources property has been added to ILoadOptions interface. It allows to specify external fonts that are used with the presentation. Sample Code is given below.