com.aspose.words

Class TableSubstitutionRule

public class TableSubstitutionRule 
extends FontSubstitutionRule

Table font substitution rule.
This rule defines the list of substitute font names to be used if the original font is not available. Substitutes will be checked for the font name and the FontInfo.AltName (if any).

Property Getters/Setters Summary
booleangetEnabled()
void
setEnabled(booleanvalue)
           Specifies whether the rule is enabled or not.
 
Method Summary
voidaddSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames)
Adds substitute font names for given original font name.
java.lang.Iterable<java.lang.String>getSubstitutes(java.lang.String originalFontName)
Returns array containing substitute font names for the specified original font name.
voidload(java.io.InputStream stream)
Loads table substitution settings from XML stream.
voidload(java.lang.String fileName)
Loads table substitution settings from XML file.
voidloadAndroidSettings()
Loads predefined table substitution settings for Linux platform.
voidloadLinuxSettings()
Loads predefined table substitution settings for Linux platform.
voidloadWindowsSettings()
Loads predefined table substitution settings for Windows platform.
voidsave(java.io.OutputStream stream)
Saves the current table substitution settings to stream.
voidsave(java.lang.String fileName)
Saves the current table substitution settings to file.
voidsetSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames)
Override substitute font names for given original font name.
 

    • Property Getters/Setters Detail

      • getEnabled/setEnabled

        public boolean getEnabled() / public void setEnabled(boolean value)
        
        Specifies whether the rule is enabled or not.
    • Method Detail

      • addSubstitutes

        public void addSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames)
        Adds substitute font names for given original font name.
        Parameters:
        originalFontName - Original font name.
        substituteFontNames - List of alternative font names.
      • getSubstitutes

        public java.lang.Iterable<java.lang.String> getSubstitutes(java.lang.String originalFontName)
        Returns array containing substitute font names for the specified original font name.
        Parameters:
        originalFontName - Original font name.
        Returns:
        List of alternative font names.
      • load

        public void load(java.io.InputStream stream)
                 throws java.lang.Exception
        Loads table substitution settings from XML stream.
        Parameters:
        stream - Input stream.
      • load

        public void load(java.lang.String fileName)
                 throws java.lang.Exception
        Loads table substitution settings from XML file.
        Parameters:
        fileName - Input file name.
      • loadAndroidSettings

        public void loadAndroidSettings()
        Loads predefined table substitution settings for Linux platform.
      • loadLinuxSettings

        public void loadLinuxSettings()
        Loads predefined table substitution settings for Linux platform.
      • loadWindowsSettings

        public void loadWindowsSettings()
        Loads predefined table substitution settings for Windows platform.
      • save

        public void save(java.io.OutputStream stream)
                 throws java.lang.Exception
        Saves the current table substitution settings to stream.
        Parameters:
        outputStream - Output stream.
      • save

        public void save(java.lang.String fileName)
                 throws java.lang.Exception
        Saves the current table substitution settings to file.
        Parameters:
        fileName - Output file name.
      • setSubstitutes

        public void setSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames)
        Override substitute font names for given original font name.
        Parameters:
        originalFontName - Original font name.
        substituteFontNames - List of alternative font names.