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);

أنظر أيضا