You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to retrieve every font used in mapbox-gl-js for every charset-range? #809
I am trying to make mapbox work partially offline and I would like to be able to save the fonts locally. When navigating the map, it makes requests to PBF files such as:
With a range of characters I believe, such as 0-255 or when you go to china 39424-39679.pbf and so on.
It seems like the request is made when needed, surely to avoid downloading complete fonts before anything gets displayed. In my case, I wouldn't mind if the files were big, as they would be stored locally. If there a way to either:
Load the whole fonts locally so that they don't get requested again
Download every PBF for every charset range for each fonts (they are not part of the project so I don't know where to find them)
Activity
yhahn commentedon Nov 5, 2014
@fnicollet the project you're looking for is node-fontnik -- it's what's used in the Mapbox API to generate glyph PBFs for a set of fonts.
You can use the script included with it here to generate glyph PBF files for your project for all the charset ranges: https://github.com/mapbox/node-fontnik/blob/master/bin/build-glyphs.
fnicollet commentedon Nov 5, 2014
Thanks a lot !!
fnicollet commentedon Nov 5, 2014
Added an issue on the other project, I can't seem to make the script work properly, sorry