{"library":"fontkit","type":"library","category":null,"description":"Fontkit is an advanced, cross-platform font engine designed for both Node.js and browser environments, currently stable at version 2.0.4. It offers comprehensive support for numerous font formats, including TrueType, OpenType, WOFF, WOFF2, and TrueType Collections. Its core capabilities encompass accurate character-to-glyph mapping, supporting advanced substitution features like ligatures, alongside robust glyph metrics and layout functionalities such as kerning. The library deeply integrates with OpenType (GSUB, GPOS) and Apple Advanced Typography (AAT) features, providing tools for extracting glyph vector paths for SVG conversion, handling color emoji glyphs (via SBIX and COLR tables), and supporting AAT variation glyphs for dynamic design control. A significant differentiator is its efficient font subsetting mechanism, which enables developers to create optimized font files containing only the necessary glyphs. The 2.0.0 release marked a substantial modernization, migrating from Node.js-specific `Buffer` usage to `Uint8Array` and `TextDecoder`, significantly enhancing its browser compatibility and changing the subset encoding API from streaming to a direct `Uint8Array` return. It is notably used as a core component within the PDFKit library.","language":"javascript","status":"active","version":"2.0.4","tags":["javascript","opentype","font","typography","subset","emoji","glyph","layout"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fontkit","imports":["import fontkit from 'fontkit';","import fontkit from 'fontkit'; const font = fontkit.openSync('path/to/font.ttf');","import fontkit from 'fontkit'; const buffer = new Uint8Array(...); const font = fontkit.create(buffer);"]},{"cmd":"yarn add fontkit","imports":[]},{"cmd":"pnpm add fontkit","imports":[]}],"homepage":null,"github":"https://github.com/foliojs/fontkit","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fontkit","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/fontkit/compatibility"}}