diff --git a/icons/s-19-negative.svg b/icons/s-19-negative.svg index eb57687..45e1e21 100644 --- a/icons/s-19-negative.svg +++ b/icons/s-19-negative.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/s-19.svg b/icons/s-19.svg index 3ded6ad..16acab3 100644 --- a/icons/s-19.svg +++ b/icons/s-19.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/s_generator.py b/s_generator.py index 5f2f9d8..e79d9c7 100644 --- a/s_generator.py +++ b/s_generator.py @@ -41,6 +41,16 @@ def convert_svg(sn_svg): x = float(digit.group(1)) x -= WIDTH path = path[:pos[0]+1] + str(x) + path[pos[0] + len(digit.group(1)):] + + digits = list(re.finditer("A(.*? .*? .*? .*? .*? \d+(\.\d+)?)", path))[::-1] + + for digit in digits: + pos = digit.span() + s, d = digit.group(1).rsplit(" ", 1) + x = float(d) + x -= WIDTH + d = s + " " + str(x) + path = path[:pos[0]+1] + d + path[pos[0] + len(digit.group(1)):] path = S + "Z" + path sn_svg = sn_svg[:path_pos[0]] + path + sn_svg[path_pos[1]:]