-
The MapLibre Style Spec defines a URL template which must include a {fontstack}, a token that is replaced "with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer" The text-font specification, in turn, requires a text-field or an "Optional array" A stylesheet can specify a glyph in this manner:
So a directory on a server running Apache and having this tree of font files exposed:
would return the requested *.pbf file. My question: when you have a font specification for a feature with more than one font specified, are separate requests generated to retrieve each font, or is the "fontstack" sent to the server to be parsed and the individual files therein returned? Example: A style sheet having the "glyphs" defined above has this specification for a water_way_name feature where two fonts are specified:
Should there be two requests submitted to the server at http://debian1 for each of the "Noto Sans Regular" and "Noto Sans Bold" files or is there just one request which concatenates the array items, e.g. ' ["Noto Sans Regular", "Noto Sans Bold"]' into something like following?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
You can check the network tab and see... |
Beta Was this translation helpful? Give feedback.
-
I think it makes only a single request and the name is as you have specified. |
Beta Was this translation helpful? Give feedback.
-
I think what happens is in your glyph url. where the {fontstack} is gets replaced with the fonts being requested. Maplibre replaces {fonstack} with a comma delimited list of the fonts, which is supposed to be a primary font with fallback fonts (sorry I could only find this mapbox source for that) On the web server side, there is usually some code that picks the first available font and returns it. However, because you are using apache it has nothing to handle that and splt the requested fonts, so it is just looking for a folder called "Noto Sans Regular,Noto Sans Bold", which doesn't exist |
Beta Was this translation helpful? Give feedback.
For the tileserver-gl history, this one seems most relevant to me. It almost describes your issue...
maptiler/tileserver-gl#32
maptiler/tileserver-gl@a0fbf7f