Creates woff font files from truetype files, including only a subset of the glyphs.
This is based on Google's sfntly.
The maven artifacts are on Bintray and jcenter.
Download the latest jar.
Maven
Include those settings to be able to resolve jcenter artifacts.
<dependency>
<groupId>info.jdavid.font.subset</groupId>
<artifactId>extractor</artifactId>
<version>1.2.0</version>
</dependency>
Gradle
Add jcenter to the list of maven repositories.
repositories {
jcenter()
}
dependencies {
compile 'info.jdavid.font.subset:extractor1.2.0'
}
java
final Extractor extractor = new Extractor(ttfBytes);
final byte[] woffBytes = extractor.woff("subset_string");
assert woffBytes.length > 0;