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