public class FontsManager extends java.lang.Object implements IFontsManager
Manages fonts across the presentation.
Modifier and Type | Method and Description |
---|---|
void |
addEmbeddedFont(byte[] fontData,
int embedFontRule)
Adds the embedded font
|
void |
addEmbeddedFont(IFontData fontData,
int embedFontRule)
Adds the embedded font
|
IFontData[] |
getEmbeddedFonts()
Returns the fonts embedded in the presentation
|
IFontFallBackRulesCollection |
getFontFallBackRulesCollection()
Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality
Read/write
IFontFallBackRulesCollection . |
IFontData[] |
getFonts()
Returns the fonts used in the presentation
|
IFontSubstRuleCollection |
getFontSubstRuleList()
Font substitutions to use when rendering.
|
void |
removeEmbeddedFont(IFontData fontData)
Removes the embedded font
|
void |
replaceFont(IFontData sourceFont,
IFontData destFont)
Replace font in presentation
|
void |
replaceFont(IFontSubstRule substRule)
Replace font in presentation using information provided in
FontSubstRule |
void |
replaceFont(IFontSubstRuleCollection substRules)
Replace font in presentation using information provided in collection of
FontSubstRule |
void |
setFontFallBackRulesCollection(IFontFallBackRulesCollection value)
Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality
Read/write
IFontFallBackRulesCollection . |
void |
setFontSubstRuleList(IFontSubstRuleCollection value)
Font substitutions to use when rendering.
|
public final IFontSubstRuleCollection getFontSubstRuleList()
Font substitutions to use when rendering.
Read/write IFontSubstRuleCollection
.
getFontSubstRuleList
in interface IFontsManager
public final void setFontSubstRuleList(IFontSubstRuleCollection value)
Font substitutions to use when rendering.
Read/write IFontSubstRuleCollection
.
setFontSubstRuleList
in interface IFontsManager
public final IFontFallBackRulesCollection getFontFallBackRulesCollection()
Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality
Read/write IFontFallBackRulesCollection
.
Presentation pres = new Presentation(); try { // Getting of empty or preinitialized rules collection from FontsManager IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection(); // adding of rules to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); // or // initialization of new instance of rules collection IFontFallBackRulesCollection rulesList = new FontFallBackRulesCollection(); // adding of rules to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); // and replacing of existing collection by the new one in FontsManager pres.getFontsManager().setFontFallBackRulesCollection(rulesList); } finally { if (pres != null) pres.dispose(); }
getFontFallBackRulesCollection
in interface IFontsManager
public final void setFontFallBackRulesCollection(IFontFallBackRulesCollection value)
Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality
Read/write IFontFallBackRulesCollection
.
Presentation pres = new Presentation(); try { // Getting of empty or preinitialized rules collection from FontsManager IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection(); // adding of rules to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); // or // initialization of new instance of rules collection IFontFallBackRulesCollection rulesList = new FontFallBackRulesCollection(); // adding of rules to collection rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman")); // and replacing of existing collection by the new one in FontsManager pres.getFontsManager().setFontFallBackRulesCollection(rulesList); } finally { if (pres != null) pres.dispose(); }
setFontFallBackRulesCollection
in interface IFontsManager
public final IFontData[] getFonts()
Returns the fonts used in the presentation
getFonts
in interface IFontsManager
public final IFontData[] getEmbeddedFonts()
Returns the fonts embedded in the presentation
getEmbeddedFonts
in interface IFontsManager
public final void removeEmbeddedFont(IFontData fontData)
Removes the embedded font
removeEmbeddedFont
in interface IFontsManager
public final void addEmbeddedFont(IFontData fontData, int embedFontRule)
Adds the embedded font
addEmbeddedFont
in interface IFontsManager
com.aspose.ms.System.ArgumentException
- An ArgumentException can be thrown if font data is null or this font is already embedded
public final void addEmbeddedFont(byte[] fontData, int embedFontRule)
Adds the embedded font
addEmbeddedFont
in interface IFontsManager
com.aspose.ms.System.ArgumentException
- An ArgumentException can be thrown if font data is null or this font is already embedded
public final void replaceFont(IFontData sourceFont, IFontData destFont)
Replace font in presentation
replaceFont
in interface IFontsManager
sourceFont
- Source fontdestFont
- Destination fontpublic final void replaceFont(IFontSubstRule substRule)
Replace font in presentation using information provided in FontSubstRule
replaceFont
in interface IFontsManager
substRule
- Font substitution infopublic final void replaceFont(IFontSubstRuleCollection substRules)
Replace font in presentation using information provided in collection of FontSubstRule
replaceFont
in interface IFontsManager
substRules
- Font substitution rules collection