From e2e8c3f7c431ef547ba6c49076586ebec190f1bd Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 2 Jun 2020 18:58:23 +0200 Subject: [PATCH] text gets larger as one zooms in and support for global text resize transform styling from my SC PR using superior coding by @ENT8R --- global.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/global.yaml b/global.yaml index 035017f..8818aa4 100644 --- a/global.yaml +++ b/global.yaml @@ -5,7 +5,17 @@ global: text_stroke: { color: global.text_stroke_color, width: 2.5px } text_places_stroke: { color: global.text_stroke_color, width: 2.5px } text_fill_color: '#124' - text_size: 12px + text_size_scaling: 1 # intended to be overwritten by StreetComplete + text_size: | + function() { + var size = 13; + if ($zoom >= 18 && $zoom < 19) { + size = 15; + } else if ($zoom >= 19) { + size = 17; + } + return (size * global.text_size_scaling) + "px"; + } # The following colors are in most cases overwritten # ones that are used are defined in streetcomplete-light-style.yaml