EOT fonts are a compact form of Open Type Fonts as they are embedded on web pages. While the WOFF fonts are compressed fonts that enable faster downloads of your content. In certain cases, you might want to convert an EOT file to WOFF or WOFF2 format. Following such scenarios, this article covers how to convert EOT to WOFF or WOFF2 programmatically in Java.
- EOT to WOFF or WOFF2 Converter - Java API Configuration
- Convert EOT to WOFF in Java
- Convert EOT to WOFF2 in Java
EOT to WOFF or WOFF2 Converter - Java API Configuration
Aspose.Font for Java is developed to work with different kinds of fonts. You can quickly configure the API by accessing the reference JAR files from the downloads section or pasting the details below in the pom.xml file of your application.
<name>Aspose Java API</name>
Convert EOT to WOFF in Java
We can convert an EOT font to WOFF or WOFF2 format with the following steps:
- Initialize an object of FontDefinition class.
- Create a Font class object to load the source font.
- Convert EOT to WOFF font.
The following code sample demonstrates how to convert EOT to WOFF in Java.
Convert EOT to WOFF2 in Java
You need to follow the steps below to convert EOT to WOFF or WOFF2 true type font file:
- Create an instance of the FontFileDefinition class.
- Access the source font file.
- Convert the EOT font to WOFF2 format using the saveToFormat() method.
The following code snippet elaborates on how to convert EOT to WOFF2 font programmatically in Java.
Get a Free License
You can evaluate the API without any evaluation limitations by requesting a free temporary license.
In this article, you have learned how to convert EOT to WOFF or WOFF2 fonts programmatically in Java. Moreover, you can learn different other features of the API under the documentation section. In case of any concerns, please feel free to let us know via forum.