From bb847fdb9fc490676ce81cbe3bfa312d9394c846 Mon Sep 17 00:00:00 2001 From: Penegal Date: Fri, 6 Jul 2018 16:11:19 +0200 Subject: [PATCH 1/4] Added *-repeat-distance for shields and some waterways; dropped conflicting shield-min-distance --- roads.mss | 6 +++--- water.mss | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/roads.mss b/roads.mss index b61fdc0ccc..fb7ab24935 100644 --- a/roads.mss +++ b/roads.mss @@ -281,7 +281,7 @@ @shield-size-z18: 12; @shield-line-spacing-z18: -1.80; // -0.15 em @shield-spacing: 760; -@shield-min-distance: 40; +@shield-repeat-distance: 600; @shield-font: @book-fonts; @shield-clip: false; @@ -2665,7 +2665,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ shield-line-spacing: @shield-line-spacing; shield-placement: line; shield-spacing: @shield-spacing; - shield-min-distance: @shield-min-distance; + shield-repeat-distance: @shield-repeat-distance; shield-face-name: @shield-font; shield-clip: @shield-clip; @@ -2713,7 +2713,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ shield-placement: line; shield-spacing: @shield-spacing; - shield-min-distance: @shield-min-distance; + shield-repeat-distance: @shield-repeat-distance; shield-face-name: @shield-font; shield-clip: @shield-clip; diff --git a/water.mss b/water.mss index c157473163..c349cb0afc 100644 --- a/water.mss +++ b/water.mss @@ -288,6 +288,7 @@ text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; text-spacing: 600; + text-repeat-distance: 400; text-placement: line; text-vertical-alignment: middle; text-dy: 8; @@ -303,6 +304,7 @@ text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; text-spacing: 600; + text-repeat-distance: 400; text-placement: line; text-vertical-alignment: middle; text-dy: 8; From 60ac215f1c52d0af0641c35b0af1fbdded491bb3 Mon Sep 17 00:00:00 2001 From: Penegal Date: Mon, 9 Jul 2018 10:31:17 +0200 Subject: [PATCH 2/4] The same way, reduced railway, canal and highway texts --- roads.mss | 19 +++++++++++++++---- water.mss | 8 ++++++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/roads.mss b/roads.mss index fb7ab24935..3a5e602ea0 100644 --- a/roads.mss +++ b/roads.mss @@ -272,6 +272,8 @@ @track-oneway-arrow-color: darken(@track-fill, 15%); @bridleway-oneway-arrow-color: darken(@track-fill, 10%); +@text-repeat-distance: 600; + // Shield’s line wrap is based on OpenStreetMap data and not on line-wrap-width, // but lines are typically rather short, so we use narrow line spacing. @shield-size: 10; @@ -2830,6 +2832,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-clip: false; text-placement: line; text-face-name: @book-fonts; + text-repeat-distance: @text-repeat-distance; [tunnel = 'no'] { text-halo-radius: @standard-halo-radius; [highway = 'motorway'] { text-halo-fill: @motorway-fill; } @@ -2862,6 +2865,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-face-name: @book-fonts; text-halo-radius: @standard-halo-radius; text-halo-fill: @secondary-fill; + text-repeat-distance: @text-repeat-distance; } [zoom >= 14] { text-size: 9; @@ -2888,6 +2892,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-face-name: @book-fonts; text-halo-radius: @standard-halo-radius; text-halo-fill: @tertiary-fill; + text-repeat-distance: @text-repeat-distance; } [zoom >= 17] { text-size: 11; @@ -2906,6 +2911,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; text-face-name: @book-fonts; + text-repeat-distance: @text-repeat-distance; [zoom >= 17] { text-size: 11; @@ -2932,6 +2938,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-halo-radius: @standard-halo-radius; text-halo-fill: @residential-fill; text-face-name: @book-fonts; + text-repeat-distance: @text-repeat-distance; } [zoom >= 16] { text-size: 9; @@ -2961,6 +2968,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [highway = 'raceway'] { text-halo-fill: @raceway-fill; } [highway = 'service'] { text-halo-fill: @service-fill; } text-face-name: @book-fonts; + text-repeat-distance: @text-repeat-distance; } [zoom >= 17] { text-size: 11; @@ -2982,6 +2990,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [highway = 'living_street'] { text-halo-fill: @living-street-fill; } [highway = 'pedestrian'] { text-halo-fill: @pedestrian-fill; } text-face-name: @book-fonts; + text-repeat-distance: @text-repeat-distance; } [zoom >= 16] { text-size: 9; @@ -3021,6 +3030,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-face-name: @book-fonts; text-vertical-alignment: middle; text-dy: 5; + text-repeat-distance: @text-repeat-distance; } [zoom >= 16] { text-size: 9; @@ -3049,6 +3059,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-face-name: @book-fonts; text-vertical-alignment: middle; text-dy: 7; + text-repeat-distance: @text-repeat-distance; } [zoom >= 17] { text-size: 11; @@ -3173,10 +3184,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-spacing: 900; text-clip: false; text-placement: line; - text-min-distance: 18; text-face-name: @book-fonts; text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; + text-repeat-distance: @text-repeat-distance; } [zoom >= 19] { text-size: 11; @@ -3195,10 +3206,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-spacing: 300; text-clip: false; text-placement: line; - text-min-distance: 18; text-face-name: @book-fonts; text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; + text-repeat-distance: @text-repeat-distance; } [zoom >= 13] { text-dy: 6; @@ -3224,10 +3235,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-spacing: 300; text-clip: false; text-placement: line; - text-min-distance: 18; text-face-name: @book-fonts; text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; + text-repeat-distance: @text-repeat-distance; } [zoom >= 17] { text-spacing: 600; @@ -3254,10 +3265,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-spacing: 900; text-clip: false; text-placement: line; - text-min-distance: 18; text-face-name: @book-fonts; text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; + text-repeat-distance: @text-repeat-distance; } [zoom >= 19] { text-size: 11; diff --git a/water.mss b/water.mss index c349cb0afc..4cdfd56b7e 100644 --- a/water.mss +++ b/water.mss @@ -2,6 +2,8 @@ @glacier: #ddecec; @glacier-line: #9cf; +@text-repeat-distance: 600; + #water-areas { [natural = 'glacier']::natural { [zoom >= 8] { @@ -266,6 +268,7 @@ text-halo-fill: @standard-halo-fill; text-spacing: 400; text-placement: line; + text-repeat-distance: @text-repeat-distance; [zoom >= 14] { text-size: 12; } [int_tunnel = 'yes'] { text-min-distance: 200; } } @@ -278,6 +281,7 @@ text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; text-placement: line; + text-repeat-distance: @text-repeat-distance; } [waterway = 'stream'][zoom >= 15] { @@ -288,7 +292,7 @@ text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; text-spacing: 600; - text-repeat-distance: 400; + text-repeat-distance: @text-repeat-distance; text-placement: line; text-vertical-alignment: middle; text-dy: 8; @@ -304,7 +308,7 @@ text-halo-radius: @standard-halo-radius; text-halo-fill: @standard-halo-fill; text-spacing: 600; - text-repeat-distance: 400; + text-repeat-distance: @text-repeat-distance; text-placement: line; text-vertical-alignment: middle; text-dy: 8; From 7844c96bf92bd71b069d56e77b756c261b1277b7 Mon Sep 17 00:00:00 2001 From: Penegal Date: Fri, 13 Jul 2018 15:02:00 +0200 Subject: [PATCH 3/4] Added `shield-margin`, thanks to @talaj; decreased shield-repeat-distance, asked by @kocio-pl --- roads.mss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roads.mss b/roads.mss index 3a5e602ea0..3218dc6c27 100644 --- a/roads.mss +++ b/roads.mss @@ -283,7 +283,8 @@ @shield-size-z18: 12; @shield-line-spacing-z18: -1.80; // -0.15 em @shield-spacing: 760; -@shield-repeat-distance: 600; +@shield-repeat-distance: 400; +@shield-margin: 40; @shield-font: @book-fonts; @shield-clip: false; @@ -2668,6 +2669,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; + shield-margin: @shield-margin; shield-face-name: @shield-font; shield-clip: @shield-clip; @@ -2716,6 +2718,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ shield-placement: line; shield-spacing: @shield-spacing; shield-repeat-distance: @shield-repeat-distance; + shield-margin: @shield-margin; shield-face-name: @shield-font; shield-clip: @shield-clip; From da8039a1ea1d4628ff8564ac56529fcca8b46b0a Mon Sep 17 00:00:00 2001 From: Penegal Date: Mon, 16 Jul 2018 11:18:21 +0200 Subject: [PATCH 4/4] Decreased text-repeat-distance to 50; removed it for residential roads --- roads.mss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roads.mss b/roads.mss index 3218dc6c27..24314c3923 100644 --- a/roads.mss +++ b/roads.mss @@ -272,7 +272,7 @@ @track-oneway-arrow-color: darken(@track-fill, 15%); @bridleway-oneway-arrow-color: darken(@track-fill, 10%); -@text-repeat-distance: 600; +@text-repeat-distance: 50; // Shield’s line wrap is based on OpenStreetMap data and not on line-wrap-width, // but lines are typically rather short, so we use narrow line spacing. @@ -2941,7 +2941,6 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ text-halo-radius: @standard-halo-radius; text-halo-fill: @residential-fill; text-face-name: @book-fonts; - text-repeat-distance: @text-repeat-distance; } [zoom >= 16] { text-size: 9; @@ -2993,7 +2992,6 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ [highway = 'living_street'] { text-halo-fill: @living-street-fill; } [highway = 'pedestrian'] { text-halo-fill: @pedestrian-fill; } text-face-name: @book-fonts; - text-repeat-distance: @text-repeat-distance; } [zoom >= 16] { text-size: 9;