get_FontsManager()

Presentation::get_FontsManager() method

Returns fonts manager. Read-only IFontsManager.

System::SharedPtr<IFontsManager> Aspose::Slides::Presentation::get_FontsManager() override

Remarks

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

auto presentation = System::MakeObject<Presentation>(u"Fonts.pptx");
System::ArrayPtr<System::SharedPtr<IFontData>> allFonts = presentation->get_FontsManager()->GetFonts();
System::ArrayPtr<System::SharedPtr<IFontData>> embeddedFonts = presentation->get_FontsManager()->GetEmbeddedFonts();

for (auto&& font : allFonts)
{
    if (!embeddedFonts->Contains(font))
    {
        presentation->get_FontsManager()->AddEmbeddedFont(font, EmbedFontCharacters::All);
    }
}

// Save the presentation
presentation->Save(u"AddEmbeddedFont_out.pptx", SaveFormat::Pptx);

See Also