Skip to content

Releases: mapbox/node-fontnik

Release list

v0.7.7

Choose a tag to compare

@kkaefer kkaefer released this 02 Jul 11:02

What's Changed

  • Replace node-gyp and Mason with CMake/Ninja and include binaries in NPM tarball (#201)
  • Fix integer-overflow heap out-of-bounds write in RenderSDF (#202)

Note: Rendered Glyph shapes change slightly

The changes in glyphs stem from node-fontnik upgrading FreeType from 2.7.1 to 2.14.3. Some glyph output may differ from earlier releases, mainly on TrueType composite glyphs like accented Latin letters, fractions (¼ ½ ¾), ±, and similar.

node-fontnik loads glyphs with FT_LOAD_NO_HINTING. In 2.7.1, composite components flagged ROUND_XY_TO_GRID still had their XY offsets rounded to the pixel grid even without hinting. In 2.14.3, that rounding only applies when hinting is active, so unhinted composites can sit at sub-pixel positions. That can shift outlines by up to a pixel and change SDF values near edges.

Simple glyphs are unaffected. Most of a 0–255 range PBF is unchanged; differences cluster on composites. Many SDF deltas are below the Mapbox GL rendering threshold.

This is intentional FreeType behavior (see the 2.8 release notes), not a build-configuration difference:

If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType now scales the font linearly again (bug introduced in version 2.4.6).

Full Changelog: v0.7.4...v0.7.7