FontSubstitutionSettings.TableSubstitution
FontSubstitutionSettings TableSubstitution property. Settings related to table substitution rule.
FontSubstitutionSettings.TableSubstitution property
Settings related to table substitution rule.
public TableSubstitutionRule TableSubstitution { get; }
Examples
Shows how to configure table substitution rule.
FontSettings fontSettings = new FontSettings();
// Add substitutions for Arial font
fontSettings.SubstitutionSettings.TableSubstitution.AddSubstitutes("Arial", "Times New Roman", "FangSong");
fontSettings.SubstitutionSettings.TableSubstitution.AddSubstitutes("Arial", "Courier New");
// Get substitutions for Arial.
IEnumerable<string> substitutes = fontSettings.SubstitutionSettings.TableSubstitution.GetSubstitutes("Arial");
Assert.That(substitutes.Count, Is.EqualTo(3));
// Override substitutions for Arial font
fontSettings.SubstitutionSettings.TableSubstitution.SetSubstitutes("Arial", "Times New Roman");
substitutes = fontSettings.SubstitutionSettings.TableSubstitution.GetSubstitutes("Arial");
Assert.That(substitutes.Count, Is.EqualTo(1));
See Also
- class TableSubstitutionRule
- class FontSubstitutionSettings
- namespace Wordize.Fonts
- assembly Wordize