diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f4967fe..b040f31e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - _...Add new stuff here..._ ### 🐞 Bug fixes +- The validator no longer fails if the style lacks a `glyphs` property ([#1347](https://github.com/maplibre/maplibre-style-spec/pull/1347)) - _...Add new stuff here..._ ## 24.3.0 diff --git a/src/validate/validate_property.ts b/src/validate/validate_property.ts index 916222a9e..29ff4e8b4 100644 --- a/src/validate/validate_property.ts +++ b/src/validate/validate_property.ts @@ -43,9 +43,6 @@ export function validateProperty(options, propertyType) { const errors = []; if (options.layerType === 'symbol') { - if (propertyKey === 'text-field' && style && !style.glyphs) { - errors.push(new ValidationError(key, value, 'use of "text-field" requires a style "glyphs" property')); - } if (propertyKey === 'text-font' && isFunction(deepUnbundle(value)) && unbundle(value.type) === 'identity') { errors.push(new ValidationError(key, value, '"text-font" does not support identity functions')); } diff --git a/test/integration/style-spec/tests/missing-glyphs.input.json b/test/integration/style-spec/tests/missing-glyphs.input.json deleted file mode 100644 index 64faeb34b..000000000 --- a/test/integration/style-spec/tests/missing-glyphs.input.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 8, - "sources": { - "vector": { - "type": "vector", - "url": "https://demotiles.maplibre.org/tiles/tiles.json" - } - }, - "layers": [ - { - "id": "minimum", - "type": "symbol", - "source": "vector", - "source-layer": "layer", - "layout": { - "text-font": ["Helvetica"], - "text-field": "{foo}" - } - } - ] -} diff --git a/test/integration/style-spec/tests/missing-glyphs.output-api-supported.json b/test/integration/style-spec/tests/missing-glyphs.output-api-supported.json deleted file mode 100644 index a5ee2c619..000000000 --- a/test/integration/style-spec/tests/missing-glyphs.output-api-supported.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "message": "layers[0].layout.text-field: use of \"text-field\" requires a style \"glyphs\" property", - "line": 17 - } -] \ No newline at end of file diff --git a/test/integration/style-spec/tests/missing-glyphs.output.json b/test/integration/style-spec/tests/missing-glyphs.output.json deleted file mode 100644 index a5ee2c619..000000000 --- a/test/integration/style-spec/tests/missing-glyphs.output.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "message": "layers[0].layout.text-field: use of \"text-field\" requires a style \"glyphs\" property", - "line": 17 - } -] \ No newline at end of file