PDFKit v0.8.0 Release NotesRelease Date: 2016-08-26 // almost 6 years ago
Switches the font engine from an internal one to fontkit, an advanced text shaping engine I've been working on for a while. For PDFKit, this means the following features and improvements:
- 👌 Support for OpenType (CFF), WOFF, and WOFF2 fonts. Previously PDFKit only supported TTF, DFont, and TTC fonts.
- 👌 Support for advanced text layout features, including ligatures, kerning, and other advanced glyph substitutions and positioning adjustments.
- 👌 Support for OpenType GSUB and GPOS tables, and script specific shapers (currently Arabic and Hangul shapers are included).
- 👌 Support for Apple Advanced Typography (morx) substitutions.
- 👌 Support for kerning built-in PDF fonts using data from AFM files.
- 👌 Support for vertical positioning adjustments, e.g. for accents on non-composite glyphs.
- 👍 Fonts are now embedded as CID fonts, meaning support for large character sets like CJK scripts is much improved.
PDFKit's API remains almost exactly the same, the changes are entirely under the covers. The only addition is a new
featuresoption to the
doc.textmethod, which can be used to apply custom OpenType features to the text. If given, it should be an array of OpenType feature tags. Most of the time, this is unnecessary as the script shaper will automatically apply required features.