-
-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
text-max-width
render tests from MapLibre GL JS (#2441)
- Loading branch information
Showing
12 changed files
with
383 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+7.29 KB
.../integration/render-tests/text-max-width/force-newline-line-center/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions
59
...cs/integration/render-tests/text-max-width/force-newline-line-center/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,59 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256 | ||
} | ||
}, | ||
"zoom": 4, | ||
"sources": { | ||
"maplibre": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-20, | ||
0 | ||
], | ||
[ | ||
20, | ||
0 | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "literal", | ||
"type": "symbol", | ||
"source": "maplibre", | ||
"layout": { | ||
"symbol-placement": "line-center", | ||
"text-field": "abcde\nabcde", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
] | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+4.11 KB
metrics/integration/render-tests/text-max-width/force-newline-line/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions
52
metrics/integration/render-tests/text-max-width/force-newline-line/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,52 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256 | ||
} | ||
}, | ||
"sources": { | ||
"maplibre": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ | ||
0, | ||
0 | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "literal", | ||
"type": "symbol", | ||
"source": "maplibre", | ||
"layout": { | ||
"text-field": "abcde\nabcde", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
], | ||
"text-max-width": 50 | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+6.13 KB
...ation/render-tests/text-max-width/zero-width-line-center-placement/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions
66
...gration/render-tests/text-max-width/zero-width-line-center-placement/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,66 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 128, | ||
"width": 512 | ||
} | ||
}, | ||
"center": [ | ||
-2, | ||
0 | ||
], | ||
"zoom": 6, | ||
"sources": { | ||
"maplibre": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-20, | ||
0 | ||
], | ||
[ | ||
20, | ||
0 | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "literal", | ||
"type": "symbol", | ||
"source": "maplibre", | ||
"layout": { | ||
"symbol-placement": "line-center", | ||
"text-field": "Lorem ipsum dolor sit amet.", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
], | ||
"text-max-width": 0, | ||
"text-anchor": "left" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+6.17 KB
.../integration/render-tests/text-max-width/zero-width-line-placement/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions
66
...cs/integration/render-tests/text-max-width/zero-width-line-placement/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,66 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 128, | ||
"width": 512 | ||
} | ||
}, | ||
"center": [ | ||
10, | ||
0 | ||
], | ||
"zoom": 4, | ||
"sources": { | ||
"maplibre": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-20, | ||
0 | ||
], | ||
[ | ||
20, | ||
0 | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "literal", | ||
"type": "symbol", | ||
"source": "maplibre", | ||
"layout": { | ||
"symbol-placement": "line", | ||
"text-field": "Lorem ipsum dolor sit amet.", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
], | ||
"text-max-width": 0, | ||
"text-anchor": "left" | ||
} | ||
} | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
...ics/linux-gcc8-release/render-tests/text-max-width/force-newline-line-center/metrics.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,35 @@ | ||
{ | ||
"network": [ | ||
[ | ||
"probeNetwork - default - end", | ||
1, | ||
84942 | ||
], | ||
[ | ||
"probeNetwork - default - start", | ||
0, | ||
0 | ||
] | ||
], | ||
"gfx": [ | ||
[ | ||
"probeGFX - default - end", | ||
2, | ||
13, | ||
13, | ||
1, | ||
[ | ||
143108, | ||
143108 | ||
], | ||
[ | ||
262, | ||
262 | ||
], | ||
[ | ||
3264, | ||
3264 | ||
] | ||
] | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line/metrics.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,35 @@ | ||
{ | ||
"network": [ | ||
[ | ||
"probeNetwork - default - end", | ||
1, | ||
84942 | ||
], | ||
[ | ||
"probeNetwork - default - start", | ||
0, | ||
0 | ||
] | ||
], | ||
"gfx": [ | ||
[ | ||
"probeGFX - default - end", | ||
1, | ||
4, | ||
9, | ||
1, | ||
[ | ||
35777, | ||
35777 | ||
], | ||
[ | ||
142, | ||
142 | ||
], | ||
[ | ||
1664, | ||
1664 | ||
] | ||
] | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
...ux-gcc8-release/render-tests/text-max-width/zero-width-line-center-placement/metrics.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,35 @@ | ||
{ | ||
"network": [ | ||
[ | ||
"probeNetwork - default - end", | ||
1, | ||
84942 | ||
], | ||
[ | ||
"probeNetwork - default - start", | ||
0, | ||
0 | ||
] | ||
], | ||
"gfx": [ | ||
[ | ||
"probeGFX - default - end", | ||
2, | ||
13, | ||
13, | ||
1, | ||
[ | ||
164840, | ||
164840 | ||
], | ||
[ | ||
574, | ||
574 | ||
], | ||
[ | ||
7424, | ||
7424 | ||
] | ||
] | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
...ics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-placement/metrics.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,35 @@ | ||
{ | ||
"network": [ | ||
[ | ||
"probeNetwork - default - end", | ||
1, | ||
84942 | ||
], | ||
[ | ||
"probeNetwork - default - start", | ||
0, | ||
0 | ||
] | ||
], | ||
"gfx": [ | ||
[ | ||
"probeGFX - default - end", | ||
2, | ||
13, | ||
13, | ||
1, | ||
[ | ||
164840, | ||
164840 | ||
], | ||
[ | ||
574, | ||
574 | ||
], | ||
[ | ||
7424, | ||
7424 | ||
] | ||
] | ||
] | ||
} |