IFontFallBackRulesCollection

All Implemented Interfaces: com.aspose.slides.IGenericCollection

public interface IFontFallBackRulesCollection extends IGenericCollection<IFontFallBackRule>

Represents a collection of FontFallBack rules, defined by user

Methods

MethodDescription
get_Item(int index)Gets the rule at the specified index.
add(IFontFallBackRule sourceRule)Add a new FallBack rule to the end of the collection.
remove(IFontFallBackRule targetRule)Removes the first occurrence of a specific FallBack rule from the collection.

get_Item(int index)

public abstract IFontFallBackRule get_Item(int index)

Gets the rule at the specified index. Read-only IFontFallBackRule.


Presentation pres = new Presentation();
 try
 {
     //Getting of empty or preinitialized rules collection from FontsManager
     IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection();
     //Adding of several rules to collection
     rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
     rulesList.add(new FontFallBackRule(0x3040, 0x309F, "MS Mincho"));
     //Retrieving of object of the first rule in collection
     IFontFallBackRule firstRule = rulesList.get_Item(0);
 }
 finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
indexint

Returns: IFontFallBackRule

add(IFontFallBackRule sourceRule)

public abstract void add(IFontFallBackRule sourceRule)

Add a new FallBack rule to the end of the collection.


Presentation pres = new Presentation();
 try
 {
     //Getting of empty or preinitialized rules collection from FontsManager
     IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection();
     //Adding of new rule to collection
     rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
 }
 finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
sourceRuleIFontFallBackRuleSpecified rule for adding

remove(IFontFallBackRule targetRule)

public abstract void remove(IFontFallBackRule targetRule)

Removes the first occurrence of a specific FallBack rule from the collection.


Presentation pres = new Presentation();
 try
 {
     //Getting of empty or preinitialized rules collection from FontsManager
     IFontFallBackRulesCollection rulesList = pres.getFontsManager().getFontFallBackRulesCollection();
     //Adding of several rules to collection
     rulesList.add(new FontFallBackRule(0x400,0x4FF, "Times New Roman"));
     rulesList.add(new FontFallBackRule(0x3040, 0x309F, "MS Mincho"));
     //Retrieving of object of the first rule in collection
     IFontFallBackRule firstRule = rulesList.get_Item(0);
     //Removing 
     rulesList.remove(firstRule);
 }
 finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
targetRuleIFontFallBackRuleThe rule to remove from the collection.