Convert CFF to TTF in Java.

CFF files have the flexibility and extensibility to be used with high-quality printing environments. In some cases, you may need to convert a CFF file to TTF True Type font format. Accordingly, this article covers how to convert CFF to TTF programmatically in Java.

  1. CFF to TTF Converter - Java API Configuration
  2. How to Convert CFF to TTF in Java
  3. Convert CFF to TTF Programmatically in Java

CFF to TTF Converter - Java API Configuration

Aspose.Font for Java API supports manipulating different types of fonts7] or converting them to supported file formats. You may download the JAR file of the API or use the following Maven configurations in the pom.xml file of your project.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository> 
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-font</artifactId>
    <version>22.9</version>
</dependency>

How to Convert CFF to TTF in Java

We can convert a CFF font to TTF format with the following steps:

  1. Create font file definition.
  2. Load the input font with font replacement and other data.
  3. Convert CFF to TTF font.

The section below furher elaborates how to convert CFF to TTF in Java.

Convert CFF to TTF Programmatically in Java

You need to follow the steps below to convert CFF to TTF true-type font file:

  1. Create an object of the FontFileDefinition class.
  2. Load the source CFF file with font replacement and related information.
  3. Convert CFF font to TTF format with saveToFormat() method.

The code snippet below explains how to convert CFF to TTF programmatically in Java.

Get a Free License

You may request free temporary license to try the API without any evaluation watermark or limitations.

Conclusion

In this article, you have understood how to convert CFF to TTF True Type fonts programmatically in Java. Whereas, you may further explore other features by taking a look at the documentation space. In case of any queries, please write to us atforum.

See Also