Skip to content

Commit

Permalink
Add text-max-width render tests from MapLibre GL JS (#2441)
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers committed May 29, 2024
1 parent 9c6ba69 commit 6dd43ae
Show file tree
Hide file tree
Showing 12 changed files with 383 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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"
]
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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"
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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"
}
}
]
}
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
]
]
]
}
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
]
]
]
}
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
]
]
]
}
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
]
]
]
}

0 comments on commit 6dd43ae

Please sign in to comment.