← Back to all sparks
S

systemfonts

DESIGN
Velocity0.0

System font access and font matching for R graphics devices

The R font layer stopped matching fonts and started acquiring them.

fontsgraphics-stackvariable-fontswebfontsr-libmaintenance
Current state
systemfonts is the font matching and shaping engine underneath ragg, svglite and textshaping, and its recent releases have pushed it well past its original job. It can now register uninstalled font files, pull fonts from Google Fonts and Bunny Fonts, emit stylesheet imports for HTML and SVG embedding, and hand glyph outlines and bitmaps to other C-level consumers. The last two releases are pure upkeep: a FreeType compilation fix, a sanitizer issue, and a workaround for a broken macOS system font.
Where it's heading
The arc is from passive lookup to active font provisioning. Variable font support in 1.3.0 is the clearest marker — it is explicitly gated on downstream packages upgrading to use it, which means systemfonts is now setting the pace for the rest of the R graphics stack rather than following it. Reference counting on cached faces points the same direction: the package is being hardened as a shared resource other packages hold handles into, not a leaf utility.
Prediction
Expect the deprecation of the bold argument in favour of weight to complete, and expect the variable-font API to show up in ragg and svglite before it shows up in user-facing packages.

Recent moves

  1. 5mo ago

    Compile fixes for old FreeType and a broken macOS font

    Compilation fixes for old FreeType versions, a warning cleanup, and guards against a corrupt macOS system font and zero-length input. Housekeeping against other people's breakage, which is where this package spends most of its release budget between feature cycles.

    View source ↗
  2. 10mo ago

    Sanitizer fix in variation axis name conversion

    A single sanitizer fix in variation axis name conversion, following one day after the 1.3.0 variable-font release. No user-visible change.

    View source ↗
  3. 10mo ago

    Variable font support lands across systemfonts

    ⚡ SPARK

    The release that turns systemfonts into the variable-font gateway for the whole R graphics stack, alongside Bunny Fonts imports, reference-counted face caching, and glyph and charmap introspection. This is the capability step the rest of the arc has been building toward.

    View source ↗
  4. 1y ago

    Font embedding stylesheets and C-level glyph access

    Adds fonts_as_import() to generate stylesheet URLs for embedding fonts in HTML and SVG output, plus two C-level entry points for glyph outline and bitmap data. Both feed the provisioning arc — one for web output, one for other packages rendering glyphs themselves.

    View source ↗
  5. 1y ago

    add_fonts() accepts URLs; macOS compile fix

    add_fonts() now accepts URLs as well as local file paths, extending the font acquisition path that 1.2.0 opened. Also fixes a macOS Objective-C++ compilation failure.

    View source ↗
  6. 1y ago

    Memory and download fixes in the new font-fetching path

    A memory fix in add_fonts(), a Font Squirrel download path bug, and a default change away from woff2 files because support is patchy. Corrections to the download machinery introduced one release earlier.

    View source ↗