-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add render test to verify that linear filtering is used
Test that linear filtering is used for icons in text when text-size is zoom-dependent.
- Loading branch information
1 parent
71a6428
commit 88c6c87
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+3.4 KB
...ation/render-tests/text-field/formatted-images-zoom-dependent-size/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions
69
...gration/render-tests/text-field/formatted-images-zoom-dependent-size/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 128, | ||
"width": 128, | ||
"allowed": 0.014 | ||
} | ||
}, | ||
"center": [ 0, 0 ], | ||
"zoom": 12, | ||
"sources": { | ||
"point": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ 0, 0 ] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"sprite": "local://sprites/emerald@2x", | ||
"layers": [ | ||
{ | ||
"id": "text_zoom_constant", | ||
"type": "symbol", | ||
"source": "point", | ||
"layout": { | ||
"text-offset": [0, -1], | ||
"text-size": [ | ||
"interpolate", | ||
["linear"], | ||
["zoom"], | ||
4, | ||
8, | ||
20, | ||
34 | ||
], | ||
"text-field": ["format", "Zoom", ["image", "rer"]], | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "text_zoom_dependent", | ||
"type": "symbol", | ||
"source": "point", | ||
"layout": { | ||
"text-offset": [0, 1], | ||
"text-size": 21, | ||
"text-field": ["format", "Zoom", ["image", "rer"]], | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
] | ||
} | ||
} | ||
] | ||
} |