Home

Awesome

AOTS

The Annotated OpenType specification interleaves a number of pieces:

Similarly, there is an Annotated CFF specification, and an Annotated Type2 specification.

Building

All the code is written in Java, so you will need a Java installation.

To build AOTS, simply run make.

AOTS uses a literate programming style. The source material is all in src/. The build process tangles the code in java/ and jars/, the schemas in schemas/, the test fonts and test cases in tests/. It weaves in html/.

The build process also runs the tests against the code.

After you have built AOTS, it may be helpful to look at a simple piece of the specification, Section 25.6, Single Substitution Format 1, to see how this Annotated Specification is organized.

Limitations

This is work in progress. Among the major missing pieces:

The font decompiler

The decompiler is implemented as the main method of the class com.adobe.aots.opentype.Decompiler. It takes an OpenType font file and produces an XML representation of it.

The order of arguments matters.

Optional: -t followed by names of tables, separated by ',' (e.g. -t 'CFF,GPOS,GSUB'), to select which tables to decompile. All tables if this argument is absent.

Optional: one of -exact or -readable, defaults to readable. In exact mode, the decompilation result is made to closely reflect what is in the font; for example, the details of how a coverage is defined are visible. In readable mode, the result is made as readable as possible; for example, you will only know which glyphs are covered, not how this coverage is expressed. However, readable does not loose information.

Optional: one of -pointers=never, -pointers=asneeded or -pointers=always, defaults to never in readable mode, to asneeded in exact mode. OpenType fonts have internal pointers between data structures. With always, those pointers are explicitly represented; with never, they are never represented; with asneeded, they are represented only if the thing that is pointed to is pointed from multiple places.

Optional: -o outputfile sends the output to _outputfile, defaults to standard output.

Mandatory: fontfile

Current limitations: not all tables are supported. There will be no trace of the 'glyf' and 'loca' tables; for the other unsupported table, you will have an <unknownTable> element.

The font compiler

The compiler is implemented as the main method of the class com.adobe.aot.opentype.Compiler. It takes an XML representation of an OpenType font and creates a font file.

The order of arguments matters.

Mandatory: -r schemafile points to the RNG schema for the XML representation: schemas/opentype.rnc.

Mandatory: -o outputfile for the resulting font file

Mandatory: inputfile

Current limitations: probably many. Use with caution.