GetFontEmbeddingLevel()

IFontsManager::GetFontEmbeddingLevel(System::ArrayPtr<uint8_t>, System::String) method

Determines the embedding level of a font from the given byte array and font name.

virtual EmbeddingLevel Aspose::Slides::IFontsManager::GetFontEmbeddingLevel(System::ArrayPtr<uint8_t> fontBytes, System::String fontName)=0

Arguments

ParameterTypeDescription
fontBytesSystem::ArrayPtr<uint8_t>The byte array containing the font data.
fontNameSystem::StringThe name of the font.

Return Value

The embedding level of the specified font.

Remarks

System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"Presentation.pptx");

// Retrieve all fonts used in the presentation
System::ArrayPtr<System::SharedPtr<IFontData>> fontDatas = pres->get_FontsManager()->GetFonts();

// Get the byte array representing the regular style of the first font in the presentation
System::ArrayPtr<uint8_t> bytes = pres->get_FontsManager()->GetFontBytes(fontDatas[0], System::Drawing::FontStyle::Regular);

// Determine the embedding level of the font
EmbeddingLevel embeddingLevel = pres->get_FontsManager()->GetFontEmbeddingLevel(bytes, fontDatas[0]->get_FontName());

See Also