FolderFontSource

FolderFontSource(string, bool)

الممثل.

public FolderFontSource(string folderPath, bool scanSubfolders)
معامليكتبوصف
folderPathStringالمسار إلى المجلد.
scanSubfoldersBooleanيحدد ما إذا كان سيتم فحص المجلدات الفرعية أم لا.

أمثلة

يوضح كيفية استخدام مجلد النظام المحلي الذي يحتوي على الخطوط كمصدر للخط.

// قم بإنشاء مصدر خط من مجلد يحتوي على ملفات الخطوط.
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);

أنظر أيضا


FolderFontSource(string, bool, int)

الممثل.

public FolderFontSource(string folderPath, bool scanSubfolders, int priority)
معامليكتبوصف
folderPathStringالمسار إلى المجلد.
scanSubfoldersBooleanيحدد ما إذا كان سيتم فحص المجلدات الفرعية أم لا.
priorityInt32أولوية مصدر الخط. انظرPriority وصف العقار لمزيد من المعلومات.

أمثلة

يوضح كيفية استخدام مجلد النظام المحلي الذي يحتوي على الخطوط كمصدر للخط.

// قم بإنشاء مصدر خط من مجلد يحتوي على ملفات الخطوط.
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);

أنظر أيضا