Skip to content

Commit abd1a97

Browse files
authored
Validator: Relaxed requirement for glyphs when using text-field (#1347)
1 parent d104415 commit abd1a97

File tree

5 files changed

+1
-36
lines changed

5 files changed

+1
-36
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- _...Add new stuff here..._
55

66
### 🐞 Bug fixes
7+
- The validator no longer fails if the style lacks a `glyphs` property ([#1347](https://github.com/maplibre/maplibre-style-spec/pull/1347))
78
- _...Add new stuff here..._
89

910
## 24.3.0

src/validate/validate_property.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ export function validateProperty(options, propertyType) {
4343
const errors = [];
4444

4545
if (options.layerType === 'symbol') {
46-
if (propertyKey === 'text-field' && style && !style.glyphs) {
47-
errors.push(new ValidationError(key, value, 'use of "text-field" requires a style "glyphs" property'));
48-
}
4946
if (propertyKey === 'text-font' && isFunction(deepUnbundle(value)) && unbundle(value.type) === 'identity') {
5047
errors.push(new ValidationError(key, value, '"text-font" does not support identity functions'));
5148
}

test/integration/style-spec/tests/missing-glyphs.input.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/integration/style-spec/tests/missing-glyphs.output-api-supported.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/integration/style-spec/tests/missing-glyphs.output.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)