Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

lukasmartinelli-alt/glfonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Free Mapbox GL Fonts Code is public domain

⚠️ Please migrate to orangemug/font-glyphs. This repository is no longer maintained by Lukas Martinelli.

Configuring fonts in Mapbox GL without using the Mapbox API is a pain and struggle. No one should need to know how the fonts are packaged in order to use Mapbox GL without Mapbox. This project packages the most common free fonts with fontnik so you don't have to worry about SDL and gzipped PBFs.

Configure Mapbox GL Style JSON

Your current Mapbox GL Style JSON configuration for glyphs will look like this.

"glyphs": "mapbox://fonts/morgenkaffee/{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://glfonts.lukasmartinelli.ch/fonts/{fontstack}/{range}.pbf.

"glyphs": "http://glfonts.lukasmartinelli.ch/fonts/{fontstack}/{range}.pbf",

Supported Fonts

The following fonts that are available in Mapbox Studio are supported.

  • Open Sans13Selected
  • Open Sans Regular
  • Open Sans Semibold
  • Open Sans Bold
  • Open Sans Extrabold
  • Open Sans Light
  • Open Sans Condensed Bold
  • Open Sans Italic
  • Open Sans Semibold Italic
  • Open Sans Condensed Light
  • Open Sans Bold Italic
  • Open Sans Extrabold Italic
  • Open Sans Light Italic
  • Open Sans Condensed Light Italic
  • PT Sans
  • Roboto

Package the Fonts

Install genfontgl.

npm install genfontgl

Generate fonts.

./generate_fonts.sh

Font License

Please mind the license of the original fonts. All fonts are either licensed under OFL or Apache.

About

Downloadable Mapbox GL compatible prepackaged fonts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published