Embedding Fonts into Powerpoint slides issue

I have not been able to successfully embed fonts into my PowerPoint slides using .Net 5.0. I have tried both the FontsBasedDirectory and FontsBaseResourceLocation, and neither has seemed to work. Is there a way to debug and see if the app cannot find a font when specified?

I ran the example: Advanced Features > Private Fonts (it has the Almonte Snow font). I converted it to an .Net 5.0 app. Saving as PDF as the example shows, works. But, when I changed the save option to PPTX, the code does not embed the font into the Powerpoint exported file.

Please advise, as I have an icon font that I need to embed in a presentation. Thanks!

Hi,

Those private and embedded fonts from FontSettings class are used when saving a presentation to PDF, XPS or image formats, printing a presentation, or converting it to XpsDocument or ImageSource .
I’m afraid they’re not supported in PPTX files.

Note, we have a feature request for supporting embedded fonts in Word files, and please feel free to vote for it and add a comment for your PowerPoint requirement.
But unfortunately, this is not in our current roadmap so it won’t be available this year, for later I cannot say at this moment.

Regards,
Mario

Thanks for the prompt reply.

I added a feature request for Presentation.

Please update the documentation to make clear that Embedded Fonts are not currently supported by PPTX output.

While this example explicity states what output it supports, it does not explicity state that PPTX is not supported. Embedded Font example I believed it would work with PowerPoint output as practically every other example is germane to PPTX creation. Currently, this is not the case.

Hi,

The FontSettings is a static class, which indicates that it’s not something specific to a single instance of PresentationDocument.
The API for embedded fonts that will be exported to the PPTX file will have to be a part of the PresentationDocument class.

But also, the following is the description of this class:

Contains font related settings which are used when printing, importing or exporting a presentation to a file format that requires font information.

And as you mentioned, the example explicitly specifies when those fonts are used.
The FontSettings.Fonts can end up having 500+ fonts, I don’t believe it is expected that those fonts would end up being embedded into the PPTX file.

Nevertheless, we’ll try to gather more feedback on this matter and see how we can make things clearer.

Regards,
Mario