GetFontBytes()
Contents
[
Hide
]FontsManager::GetFontBytes(System::SharedPtr<Aspose::Slides::IFontData>, System::Drawing::FontStyle) method
Retrieves the byte array representing the font data for a specified font style and font data.
System::ArrayPtr<uint8_t> Aspose::Slides::FontsManager::GetFontBytes(System::SharedPtr<Aspose::Slides::IFontData> fontData, System::Drawing::FontStyle fontStyle) override
Arguments
Parameter | Type | Description |
---|---|---|
fontData | System::SharedPtr<Aspose::Slides::IFontData> | The font data object containing the information about the font FontData. |
fontStyle | System::Drawing::FontStyle | The style of the font for which the data is to be retrieved FontStyle. |
Return Value
A byte array containing the font data for the specified font style. If the font data or style is not found, returns null.
Remarks
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"Presentation.pptx");
// Retrieve all fonts used in the presentation
System::ArrayPtr<System::SharedPtr<IFontData>> fonts = 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(fonts[0], System::Drawing::FontStyle::Regular);
See Also
- Enum FontStyle
- Typedef ArrayPtr
- Typedef SharedPtr
- Class IFontData
- Class FontsManager
- Namespace Aspose::Slides
- Library Aspose.Slides