diff --git a/metrics/integration/render-tests/text-max-width/force-newline-line-center/expected.png b/metrics/integration/render-tests/text-max-width/force-newline-line-center/expected.png new file mode 100644 index 000000000..fcff572b3 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/force-newline-line-center/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/force-newline-line-center/style.json b/metrics/integration/render-tests/text-max-width/force-newline-line-center/style.json new file mode 100644 index 000000000..e307145f0 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/force-newline-line-center/style.json @@ -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" + ] + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/force-newline-line/expected.png b/metrics/integration/render-tests/text-max-width/force-newline-line/expected.png new file mode 100644 index 000000000..cfc757453 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/force-newline-line/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/force-newline-line/style.json b/metrics/integration/render-tests/text-max-width/force-newline-line/style.json new file mode 100644 index 000000000..a24e9f0c9 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/force-newline-line/style.json @@ -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 + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/zero-width-line-center-placement/expected.png b/metrics/integration/render-tests/text-max-width/zero-width-line-center-placement/expected.png new file mode 100644 index 000000000..b9fee2f31 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/zero-width-line-center-placement/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/zero-width-line-center-placement/style.json b/metrics/integration/render-tests/text-max-width/zero-width-line-center-placement/style.json new file mode 100644 index 000000000..f6d8565d4 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/zero-width-line-center-placement/style.json @@ -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" + } + } + ] +} diff --git a/metrics/integration/render-tests/text-max-width/zero-width-line-placement/expected.png b/metrics/integration/render-tests/text-max-width/zero-width-line-placement/expected.png new file mode 100644 index 000000000..5ac842a44 Binary files /dev/null and b/metrics/integration/render-tests/text-max-width/zero-width-line-placement/expected.png differ diff --git a/metrics/integration/render-tests/text-max-width/zero-width-line-placement/style.json b/metrics/integration/render-tests/text-max-width/zero-width-line-placement/style.json new file mode 100644 index 000000000..5d2be5891 --- /dev/null +++ b/metrics/integration/render-tests/text-max-width/zero-width-line-placement/style.json @@ -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" + } + } + ] +} diff --git a/metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line-center/metrics.json b/metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line-center/metrics.json new file mode 100644 index 000000000..9ab164292 --- /dev/null +++ b/metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line-center/metrics.json @@ -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 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line/metrics.json b/metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line/metrics.json new file mode 100644 index 000000000..b553d8692 --- /dev/null +++ b/metrics/linux-gcc8-release/render-tests/text-max-width/force-newline-line/metrics.json @@ -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 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-center-placement/metrics.json b/metrics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-center-placement/metrics.json new file mode 100644 index 000000000..539a5a8da --- /dev/null +++ b/metrics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-center-placement/metrics.json @@ -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 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-placement/metrics.json b/metrics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-placement/metrics.json new file mode 100644 index 000000000..539a5a8da --- /dev/null +++ b/metrics/linux-gcc8-release/render-tests/text-max-width/zero-width-line-placement/metrics.json @@ -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 + ] + ] + ] +} \ No newline at end of file