Skip to main content

Fonts (glyphs)

The glyphs style attribute provides a URL template for loading an SDF set in PBF format. How to use it is as follows:

"http://***/vt_map/font/{fontstack}/{range}.pbf"

The URL template should contain two tokens:

  • {fontstack} When glyphs is requested, this token will be replaced by a comma-separated list of fonts from the font stack specified in the text-font property of the symbol layer.
  • {range} When requesting glyphs, this token will be replaced with a range of 256 Unicode code points. For example, to load glyphs for Unicode Basic Latin and Basic Latin-1 Supplement block, the range should be 0-255. The actual range loaded is determined at runtime based on the text that needs to be displayed.