メインコンテンツまでスキップ

Glyphs

This property is created by Mapbox Studio automatically, and it is unlikely you will need to change it. You can use custom fonts without changing this property by adding them in Mapbox Studio or by uploading them with the Fonts API.

A style's glyphs property provides a URL template for loading signed-distance-field glyph sets in PBF format. Your map client (Mapbox GL JS, for example) will generate and send glyph requests to the specified font server using the URL template you provide.

"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"

This URL template should include two tokens:

  • {fontstack} When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer.
  • {range} When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.
このpageは役に立ちましたか?