aspose添加字体

ArrayList fontSources = new ArrayList<>();
String fontPath = new ApplicationHome().getDir().getPath() + File.separator + "template" + File.separator + "font";
FolderFontSource fontSource = new FolderFontSource(fontPath, true);
FolderFontSource fontSource2 = new FolderFontSource("C:\\Windows\\Fonts", true);
fontSources.add(fontSource);
fontSources.add(fontSource2);
FontSettings.getDefaultInstance().setFontsSources(fontSources.toArray(new FontSourceBase[fontSources.size()]));

你可能感兴趣的:(java,javascript,html)