Skip to content

is-supported-script is supported on iOS/macOS #12102

Description

@1ec5

The documentation for the is-supported-script expression operator says it is only supported in GL JS and the Android map SDK but unsupported in the iOS or macOS map SDK. In fact, support for it was added to all native platforms simultaneously in mapbox/mapbox-gl-native#11785, which made it into iOS map SDK v4.1.0 and macOS map SDK v0.8.0.

"is-supported-script": {
"doc": "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 Mapbox GL JS).",
"group": "String",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.6.0"
}
}
},

Apparently we neglected to update the style specification’s SDK support tables at all for the Android map SDK 6.6.0, iOS map SDK v4.1.0, and macOS map SDK v0.8.0 releases. #9099 backfilled the Android table cell but left out iOS and macOS. Perhaps that’s because we never added a dedicated NSExpression operator for it to iOS map SDK v4–6 or the macOS map SDK. However, occurrences of is-supported-script in style JSON are honored just as on Android, and it is possible to use the catch-all syntax MGL_FUNCTION('is-supported-script', name_script). This should be good enough to consider as “support”.

iOS map SDK v10 does in fact add a dedicated, idiomatic way to refer to this expression via the Expression.Operator.isSupportedScript enumeration case (source).

/cc @lily-chai @ZiZasaurus

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cross-platform 📺Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)docs 📜style-spec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions