Загрузка и извлечение данных | API-решение для Java

Загрузить шрифт Type1 с диска

API Aspose.Font for Java позволяет считывать типы шрифтов 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);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.