I am trying to set the font with the help of Mapbox expressions from font_size field. This doesn't work for me (Invalid data expression for "text-font". Output values must be contained as literals within the expression)
"text-font": [
"case",
['!=', ["get", "text_font"], ""],
["get", "text_font"],
['literal',['DIN Offc Pro Italic', 'Arial Unicode MS Regular']]
],
So I want to get a text-font from text_font: ["Open Sans Semibold Italic"] and if it is empty like
text_font: "" use ['DIN Offc Pro Italic', 'Arial Unicode MS Regular']
Thanks