• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class FontsManager

Manages fonts for a Presentation, including enumerating used fonts, embedding and removing embedded fonts, and configuring font substitution and fallback rules.

Maps to the OOXML p:embeddedFontLst element and the embedded font parts in the presentation package.

Inheritance
object
FontsManager
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Presentation
Assembly: DRIT.Presentation.dll
Syntax
public class FontsManager

Constructors

FontsManager()

Initializes a new instance of the FontsManager class.

Declaration
public FontsManager()

Properties

FallBackRules

Gets the collection of font fallback rules for Unicode range coverage.

Declaration
public FontFallBackRulesCollection FallBackRules { get; }
Property Value
Type Description
FontFallBackRulesCollection

SubstitutionRules

Gets the collection of font substitution rules.

Declaration
public FontSubstRuleCollection SubstitutionRules { get; }
Property Value
Type Description
FontSubstRuleCollection

Methods

AddEmbeddedFont(Stream, string)

Embeds a font from the specified stream into the presentation.

Declaration
public FontInfo AddEmbeddedFont(Stream fontStream, string fontName)
Parameters
Type Name Description
Stream fontStream

The stream containing the font data.

string fontName

The typeface name of the font to embed.

Returns
Type Description
FontInfo

The FontInfo representing the embedded font.

AddEmbeddedFont(string)

Embeds a font from the specified file path into the presentation.

Declaration
public FontInfo AddEmbeddedFont(string fontPath)
Parameters
Type Name Description
string fontPath

The path to the font file.

Returns
Type Description
FontInfo

The FontInfo representing the embedded font.

GetEmbeddedFonts()

Returns a read-only list of fonts currently embedded in the presentation.

Declaration
public IReadOnlyList<FontInfo> GetEmbeddedFonts()
Returns
Type Description
IReadOnlyList<FontInfo>

GetFonts()

Returns a list of all fonts used in the presentation, including both embedded and referenced fonts.

Declaration
public IList<FontInfo> GetFonts()
Returns
Type Description
IList<FontInfo>

RemoveEmbeddedFont(FontInfo)

Removes an embedded font from the presentation.

Declaration
public bool RemoveEmbeddedFont(FontInfo fontInfo)
Parameters
Type Name Description
FontInfo fontInfo

The font to remove.

Returns
Type Description
bool

true if the font was found and removed; otherwise false.

RemoveEmbeddedFont(string)

Removes an embedded font by typeface name.

Declaration
public bool RemoveEmbeddedFont(string fontName)
Parameters
Type Name Description
string fontName

The typeface name of the font to remove.

Returns
Type Description
bool

true if the font was found and removed; otherwise false.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX