FolderFontSource

FolderFontSource(string, bool)

Ctor.

public FolderFontSource(string folderPath, bool scanSubfolders)
ParametreTipTanım
folderPathStringKlasör yolu.
scanSubfoldersBooleanAlt klasörlerin taranıp taranmayacağını belirler.

Örnekler

Yazı tipi kaynağı olarak yazı tiplerini içeren yerel sistem klasörünün nasıl kullanılacağını gösterir.

// Yazı tipi dosyalarını içeren bir klasörden yazı tipi kaynağı oluşturun.
FolderFontSource folderFontSource = new FolderFontSource(FontsDir, false, 1);

Document doc = new Document();
doc.FontSettings = new FontSettings();
doc.FontSettings.SetFontsSources(new FontSourceBase[] {folderFontSource});

Assert.AreEqual(FontsDir, folderFontSource.FolderPath);
Assert.AreEqual(false, folderFontSource.ScanSubfolders);
Assert.AreEqual(FontSourceType.FontsFolder, folderFontSource.Type);
Assert.AreEqual(1, folderFontSource.Priority);

Ayrıca bakınız


FolderFontSource(string, bool, int)

Ctor.

public FolderFontSource(string folderPath, bool scanSubfolders, int priority)
ParametreTipTanım
folderPathStringKlasör yolu.
scanSubfoldersBooleanAlt klasörlerin taranıp taranmayacağını belirler.
priorityInt32Yazı tipi kaynağı önceliği. Bkz.Priority Daha fazla bilgi için özellik açıklaması.

Örnekler

Yazı tipi kaynağı olarak yazı tiplerini içeren yerel sistem klasörünün nasıl kullanılacağını gösterir.

// Yazı tipi dosyalarını içeren bir klasörden yazı tipi kaynağı oluşturun.
FolderFontSource folderFontSource = new FolderFontSource(FontsDir, false, 1);

Document doc = new Document();
doc.FontSettings = new FontSettings();
doc.FontSettings.SetFontsSources(new FontSourceBase[] {folderFontSource});

Assert.AreEqual(FontsDir, folderFontSource.FolderPath);
Assert.AreEqual(false, folderFontSource.ScanSubfolders);
Assert.AreEqual(FontSourceType.FontsFolder, folderFontSource.Type);
Assert.AreEqual(1, folderFontSource.Priority);

Ayrıca bakınız