This project packages the most common free fonts with fontnik so you don't have to worry about SDL and gzipped PBFs. The fonts are deployed to https://free.tilehosting.com/ which also supports concatenating fonts.
I haven't tried building these fonts yet, but using the v2.0 release on upstream:
wget https://github.com/openmaptiles/fonts/releases/download/v2.0/v2.0.zip
unzip v2.0
cd v2.0
aws s3 cp . s3://tiles.nst.guide/fonts/ --recursive --content-type application/x-protobuf --content-encoding 'gzip'
Your current Mapbox GL Style JSON configuration for glyphs
will look like this.
"glyphs": "mapbox://fonts/openmaptiles/{fontstack}/{range}.pbf",
In order to use the fonts without a Mapbox API key edit your Mapbox GL Style JSON and change the endpoint for glyphs
to http://fonts.openmaptiles.org/{fontstack}/{range}.pbf
.
"glyphs": "http://fonts.openmaptiles.org/{fontstack}/{range}.pbf",
The following fonts that are available in Mapbox Studio are supported.
- Noto Sans (patched by Klokan Technologies)
- Open Sans
- PT Sans
- Roboto
- Metropolis
Install required packages:
npm install
Generate fonts:
node ./generate.js
The PBFs will created be in the _output
directory.
Please mind the license of the original fonts. All fonts are either licensed under OFL or Apache.