is Supported Script
Returns true if the input string is expected to render legibly. Returns false if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the mapbox-gl-rtl-text plugin is not in use in MapLibre GL JS).
Example usage:
maplibreMap.getStyle().addLayer(new SymbolLayer("layer-id", "source-id")
.withProperties(
textField(
switchCase(
isSupportedScript(get("name_property")), get("name_property"),
literal("not-compatible")
)
)
));
Return
expression
Parameters
the expression to evaluate
See also
specification
Returns true if the input string is expected to render legibly. Returns false if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the mapbox-gl-rtl-text plugin is not in use in MapLibre GL JS).
Example usage:
maplibreMap.getStyle().addLayer(new SymbolLayer("layer-id", "source-id")
.withProperties(
textField(
switchCase(
isSupportedScript("ಗೌರವಾರ್ಥವಾಗಿ"), literal("ಗೌರವಾರ್ಥವಾಗಿ"),
literal("not-compatible"))
)
)
);
Return
expression
Parameters
the string to evaluate
See also
specification