Skip to content

versatiles-fonts

Recipe card from the charly-versa plugin (Images — the deployable catalog).

versatiles-fonts — SDF glyph PBFs for MapLibre

Section titled “versatiles-fonts — SDF glyph PBFs for MapLibre”
Property Value
Dependencies supervisord (transitive; no service of its own)
Distros arch + fedora
Build deps curl, jq
Install path /opt/versatiles-fonts/
Re-exported at /opt/versatiles-frontend/fonts/ (by the versatiles-frontend layer)

versatiles-org/versatiles-fonts releases a fonts.tar.gz containing all 10 font families pre-rendered as SDF (signed distance field) PBFs that MapLibre GL JS can fetch via its standard glyph URL template:

{glyphs}/{fontstack}/{range}.pbf

The directory layout inside the tarball (verified at install time):

versatiles-fonts/
├── Fira Sans Regular/
│ ├── 0-255.pbf
│ ├── 256-511.pbf
│ └── ...
├── Noto Sans Regular/
│ ├── 0-255.pbf
│ └── ...
├── Roboto Regular/
│ └── ...
└── ...

The notebook’s shortbread cell patches the style’s glyphs URL:

style.glyphs = 'http://127.0.0.1:28002/fonts/{fontstack}/{range}.pbf';

MapLibre substitutes {fontstack} (e.g. Noto Sans Regular) and {range} (e.g. 0-255) when fetching each glyph range as the user pans/zooms. The versatiles-frontend http.server serves the files directly — no special URL rewriting needed.

Build-scope:

  • versatiles-fonts-bundle-present — at least one *.pbf glyph file exists under /opt/versatiles-fonts/
  • versatiles-fonts-noto-sansNoto Sans Regular family is present (sanity check that the tarball wasn’t a partial variant)