PDFKit v0.8.0 Release Notes

Release Date: 2016-08-26 // over 7 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 features option to the doc.text method, 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.