Select to view content in your preferred language

[Style editor / Map viewer] Support "sans-serif" as a valid text-font value

822
0
10-08-2021 09:48 AM
Matthias234615
Emerging Contributor

Hello,

The style editor is pretty awesome (the one found in the Classic map viewer).

This suggestion is related to fonts. I am not a windows user, so  "Arial Unicode MS" is not present for me, and on my openlayers map, all the labels are in a serif font (gross).

I don't particularly want to load a special font on my web page. I want to specify "sans-serif" in my style, which is a fallback font name that lets each browser choose an appropriate font face. I can set this in my style by downloading it, manually modifying the JSON, and uploading. However, after I do this, no labels appear in the map viewer.

I render tiles in OpenLayers using ol-mapbox-style, so they appear properly, but it would be nice if the style editor and map viewer could handle the "sans-serif" text-font value properly. "sans-serif" is a standard thing in web development.

Tags (3)
0 Replies