1# MicroType Express in sfntly 2 3This page describes sfntly’s implementation of MicroType Express 4compression. 5 6The MicroType Express format is [documented](http://www.w3.org/Submission/MTX/), 7and is recently available under license terms we believe are friendly to 8open source (as well as proprietary) implementation. The most popular 9implementation of a decoder is Internet Explorer, as a compression 10option in its Embedded OpenType (EOT) format. Since MicroType Express 11gives an approximate 15% gain in compression over gzip, a web font 12service striving for maximum performance can benefit from implementing 13EOT compression. 14 15The current codebase in sfntly is for compression only (this is by far 16the most useful for web serving). The easiest way to get started is with 17the command line tool, sfnttool: 18 19``` 20sfnttool -e -x source.ttf source.eot 21``` 22 23The code has been tested extensively against IE, and is currently in 24production in Google Web Fonts, both for full fonts and for subsetting 25(using the text= parameter). This serving path also uses sfntly to 26compute the subsets, and is essentially the same as the -s parameter to 27sfnttool. 28 29If you’re interested in the code and details of the compression 30algorithm, here’s a bit of a guide: 31 32The top-level MicroType Express compression code is in MtxWriter.java 33(in the tools/conversion/eot directory). This code implements almost all 34of the MicroType Express format, including the hdmx tables, push 35sequences, and jump coding. The main feature missing is the VDMX table 36(vertical device metrics), which is very rarely used in web fonts. 37 38Patches are welcome -- possible areas include: implementing the VDMX 39table, speeding up the LZCOMP entropy coder (the match finding code is a 40straightforward adaptation of the algorithm in the format document), 41implementing a decoder in addition to an encoder, and porting the Java 42implementation to C++. 43