FontsManager

Presentation.FontsManager property

Returns fonts manager. Read-only IFontsManager.

public IFontsManager FontsManager { get; }

Examples

The following example shows how to add embedded fonts to PowerPoint Presentation.

[C#]
// Load presentation
using (Presentation presentation = new Presentation("Fonts.pptx"))
{
	// Load source font to be replaced
	IFontData sourceFont = new FontData("Arial");
	IFontData[] allFonts = presentation.FontsManager.GetFonts();
	IFontData[] embeddedFonts = presentation.FontsManager.GetEmbeddedFonts();
	foreach (IFontData font in allFonts)
	{
		if (!embeddedFonts.Contains(font))
		{
			presentation.FontsManager.AddEmbeddedFont(font, EmbedFontCharacters.All);
		}
	}
	// Save the presentation
	presentation.Save("AddEmbeddedFont_out.pptx", SaveFormat.Pptx);
}

See Also