GetFontEmbeddingLevel
IFontsManager.GetFontEmbeddingLevel method
Determines the embedding level of a font from the given byte array and font name.
public EmbeddingLevel GetFontEmbeddingLevel(byte[] fontBytes, string fontName)
Parameter | Type | Description |
---|---|---|
fontBytes | Byte[] | The byte array containing the font data. |
fontName | String | The name of the font. |
Return Value
The embedding level of the specified font.
Exceptions
exception | condition |
---|---|
ArgumentNullException | Thrown when fontBytes is null. |
Examples
[C#]
using (Presentation pres = new Presentation(pptxFileName))
{
// Retrieve all fonts used in the presentation
IFontData[] fontDatas = pres.FontsManager.GetFonts();
// Get the byte array representing the regular style of the first font in the presentation
byte[] bytes = pres.FontsManager.GetFontBytes(fontDatas[0], FontStyle.Regular);
// Determine the embedding level of the font
EmbeddingLevel embeddingLevel = pres.FontsManager.GetFontEmbeddingLevel(bytes, fontDatas[0].FontName);
}
See Also
- enum EmbeddingLevel
- interface IFontsManager
- namespace Aspose.Slides
- assembly Aspose.Slides