Skip to main content

font stack

A font stack is an ordered list of fonts that contains a primary font and an optional fallback font or fonts. In this example, "Open Sans Regular" is the primary font and "Arial Unicode MS Regular" is the fallback font:

["Open Sans Regular", "Arial Unicode MS Regular"]

The font stack is defined within a map's symbol layer. The font stack defines the order in which the renderer should try to find the characters used within the layer. If the renderer cannot find a character within the first font, then it will try to use the next one. It will repeat this process until it can find a font that has that character.

A style object itself does not have a main font stack. Rather, individual layers within the style object have their own font stacks that are defined within the text-font property of a symbol layer, as detailed in the Mapbox Style Specification.

Related resources:

Was this page helpful?