public class TableSubstitutionRule
Property Getters/Setters Summary | ||
---|---|---|
boolean | getEnabled() | |
void | setEnabled(booleanvalue) | |
Specifies whether the rule is enabled or not. |
Method Summary | ||
---|---|---|
void | addSubstitutes(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.
|
||
void | load(java.io.InputStream stream) | |
Loads table substitution settings from XML stream.
|
||
void | load(java.lang.String fileName) | |
Loads table substitution settings from XML file.
|
||
void | loadAndroidSettings() | |
Loads predefined table substitution settings for Linux platform.
|
||
void | loadLinuxSettings() | |
Loads predefined table substitution settings for Linux platform.
|
||
void | loadWindowsSettings() | |
Loads predefined table substitution settings for Windows platform.
|
||
void | save(java.io.OutputStream stream) | |
Saves the current table substitution settings to stream.
|
||
void | save(java.lang.String fileName) | |
Saves the current table substitution settings to file.
|
||
void | setSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames) | |
Override substitute font names for given original font name.
|
public boolean getEnabled() / public void setEnabled(boolean value)
public void addSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames)
originalFontName
- Original font name.substituteFontNames
- List of alternative font names.public java.lang.Iterable<java.lang.String> getSubstitutes(java.lang.String originalFontName)
originalFontName
- Original font name.public void load(java.io.InputStream stream) throws java.lang.Exception
stream
- Input stream.public void load(java.lang.String fileName) throws java.lang.Exception
fileName
- Input file name.public void loadAndroidSettings()
public void loadLinuxSettings()
public void loadWindowsSettings()
public void save(java.io.OutputStream stream) throws java.lang.Exception
outputStream
- Output stream.public void save(java.lang.String fileName) throws java.lang.Exception
fileName
- Output file name.public void setSubstitutes(java.lang.String originalFontName, java.lang.String[] substituteFontNames)
originalFontName
- Original font name.substituteFontNames
- List of alternative font names.Example:
Shows how to define alternative fonts if original does not exist.FontSettings fontSettings = new FontSettings(); fontSettings.getSubstitutionSettings().getTableSubstitution().addSubstitutes("Times New Roman", "Slab", "Arvo");