How to use special fonts

In my ppt, I have used some special fonts. I hope to retain the display effects of these fonts when generating preview images, rather than replacing them with others. How should I handle this?

I see there is a FontInfo property in PptConfig. Can it be used to solve this problem? How do I use it?

@qihangnet,

Regarding your question about keeping special fonts in your PowerPoint presentations, Doconut has no problem displaying special fonts if they are properly installed on the machine where Doconut server is running. If they are not found, they will be substituted.

If you have any further questions or encounter any difficulties, please don’t hesitate to ask.

I installed it in Docker, and I can check that the relevant fonts are installed correctly using commands. However, the fonts are not rendered as expected in the preview images, and are replaced with other fonts.

Can you provide me with a Dockerfile definition for special fonts that you have verified to work properly? I want to check if I missed anything.

Thank you very much.

@qihangnet,

To better assist you, could you provide us with the following information?

  1. What type and version of .NET are you currently using? (.NET Framework or .NET Standard/Core)
  2. Could you also specify the version of Doconut you are using?
  3. What Operating System are you using?
  4. Could you attach the Dockerfile you are using?

Thanks for your help.

  1. NET Core 3.1
  2. Doconut 1.0.4.2
  3. Debian 10
  4. Dockerfile.zip (1.2 KB)

@qihangnet,

Thank you for providing the details. I have forwarded the issue to our development team, who have promptly placed it in their queue for resolution. I don’t have a release date yet for this fix, but it is coming soon. In this post, I will let you know when the version with the fix is released.

We appreciate your patience and valuable feedback!

@qihangnet,

I am pleased to inform you that the new version of Doconut 24.5.0 is now available. This update includes the ability to add custom fonts to PowerPoint files through PptConfig.

Below, I provide an example of how you can add the path where the fonts are located in PptConfig:

var config = new PptConfig()
                    {
                        FontFolders = new string[] { "PATH-FONT-FOLDER" } 
                    };