FolderFontSource
محتويات
[
يخفي
]FolderFontSource(string, bool)
المولد.
public FolderFontSource(string folderPath, bool scanSubfolders)
| معامل | يكتب | وصف |
|---|---|---|
| folderPath | String | المسار إلى المجلد. |
| scanSubfolders | Boolean | يحدد ما إذا كان سيتم مسح المجلدات الفرعية أم لا. |
أمثلة
يوضح كيفية استخدام مجلد النظام المحلي الذي يحتوي على الخطوط كمصدر للخطوط.
// قم بإنشاء مصدر الخط من مجلد يحتوي على ملفات الخطوط.
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);
أنظر أيضا
- class FolderFontSource
- مساحة الاسم Aspose.Words.Fonts
- المجسم Aspose.Words
FolderFontSource(string, bool, int)
المولد.
public FolderFontSource(string folderPath, bool scanSubfolders, int priority)
| معامل | يكتب | وصف |
|---|---|---|
| folderPath | String | المسار إلى المجلد. |
| scanSubfolders | Boolean | يحدد ما إذا كان سيتم مسح المجلدات الفرعية أم لا. |
| priority | Int32 | أولوية مصدر الخط. انظر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);
أنظر أيضا
- class FolderFontSource
- مساحة الاسم Aspose.Words.Fonts
- المجسم Aspose.Words