-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Disallow expressions for text-font, or require fontstacks to be listed up front #9939
Comments
@jfirebaugh as an in-between compromise, we could allow expressions of some tightly constrained form for |
Could expressions that only include literal values be allowed? I think the most common use cases for expressions for |
Yeah, along the lines of @nickidlugash's point, one way to formulate this restriction that seems pretty reasonable both to implement and communicate:
So update: Hmm, actually the stated restriction doesn't quite capture it, since it technically would describe both of the examples above. |
That also sounds more restrictive than what @nickidlugash wants. E.g., it disallows things like |
So long as |
One of the components of an offline region download is the complete set of glyph range PBFs for all the font stacks used by that region's style. We currently determine the set of font stacks via this method:
mapbox-gl-native/src/mbgl/style/parser.cpp
Lines 271 to 294 in aa4dff1
This will fail for
text-font
properties that use an expression. We need to either disallows the use of expressions fortext-font
, or introduce a new top-level style spec property that explicitly declares all the font stacks that the style uses (or at least the font stacks that should be available offline).cc @anandthakker
The text was updated successfully, but these errors were encountered: