FontSubstitutionRule
İçindekiler
[
Saklamak
]FontSubstitutionRule class
Bu, yazı tipi değiştirme kuralı için soyut bir temel sınıftır.
Daha fazla bilgi edinmek için şu adresi ziyaret edin:Yazı Tipleriyle Çalışma belgeleme makalesi.
public abstract class FontSubstitutionRule
Özellikleri
İsim | Tanım |
---|---|
virtual Enabled { get; set; } | Kuralın etkin olup olmadığını belirtir. |
Örnekler
İşletim sistemine bağlı font yapılandırması değişimini gösterir.
FontSettings fontSettings = new FontSettings();
FontConfigSubstitutionRule fontConfigSubstitution =
fontSettings.SubstitutionSettings.FontConfigSubstitution;
bool isWindows = new[] {PlatformID.Win32NT, PlatformID.Win32S, PlatformID.Win32Windows, PlatformID.WinCE}
.Any(p => Environment.OSVersion.Platform == p);
// FontConfigSubstitutionRule nesnesi Windows/Windows olmayan platformlarda farklı çalışır.
// Windows'ta kullanılamaz.
if (isWindows)
{
Assert.False(fontConfigSubstitution.Enabled);
Assert.False(fontConfigSubstitution.IsFontConfigAvailable());
}
bool isLinuxOrMac =
new[] {PlatformID.Unix, PlatformID.MacOSX}.Any(p => Environment.OSVersion.Platform == p);
// Linux/Mac'te buna erişebileceğiz ve işlemler yapabileceğiz.
if (isLinuxOrMac)
{
Assert.True(fontConfigSubstitution.Enabled);
Assert.True(fontConfigSubstitution.IsFontConfigAvailable());
fontConfigSubstitution.ResetCache();
}
Ayrıca bakınız
- ad alanı Aspose.Words.Fonts
- toplantı Aspose.Words