加载并提取数据 | Java

Contents
[ Hide Show ]

从光盘加载 Type1 字体

Java 版 Aspose.Font API 使您可以从存储在数字存储中的文件中读取 Type1 字体类型。可以使用以下步骤加载存储在光盘上的 Type1 字体文件。

1// For complete examples and data files, please go to https://github.com/aspose-font/Aspose.Font-for-Java
2String fileName = Utils.getDataDir() + "courier.pfb"; //Font file name with full path
3
4FontDefinition fd = new FontDefinition(FontType.Type1, new FontFileDefinition("pfb", new FileSystemStreamSource(fileName)));
5      Type1Font font = (Type1Font) Font.open(fd);

Have any questions about Aspose.Font?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.