diff --git a/src/libkomapnik.py b/src/libkomapnik.py index d0e12f0..1b1b36e 100644 --- a/src/libkomapnik.py +++ b/src/libkomapnik.py @@ -140,8 +140,8 @@ def xml_textsymbolizer( pos = pos.replace("exact", "X").replace("any", "S, E, X, N, W, NE, SE, NW, SW").split(",") pos.extend([str(int(float(x) * text_scale)) for x in size.split(",")]) pos = ",".join(pos) - size = str(int(float(size.split(",")[0]) * text_scale)) -# angle = str(int(angle)) + size = str(float(size) * float(text_scale)) + angle = str(int(angle)) placement = {"center": "interior"}.get(placement.lower(), placement) align = {"center": "middle"}.get(align.lower(), align) @@ -153,8 +153,7 @@ def xml_textsymbolizer( return """ [%s] - """ % (face, int(float(size)), color, halo_color, halo_radius, placement, dx, dy, angle, overlap, wrap_width, distance, align, opacity, pos, transform, spacing, text) - + """ % (face, size, color, halo_color, halo_radius, placement, dx, dy, angle, overlap, wrap_width, distance, align, opacity, pos, transform, spacing, text) def xml_shieldsymbolizer(path="", width="", height="", text="name", face=default_font_family, size="10", color="#000000", halo_color="#ffffff", halo_radius="0", placement="line", offset="0", overlap="false", distance="26", wrap_width=256, align="center", opacity="1", transform="none", unlock_image='true', spacing='500'): @@ -162,7 +161,7 @@ def xml_shieldsymbolizer(path="", width="", height="", halo_color = nicecolor(halo_color) placement = {"center": "point"}.get(placement.lower(), placement) align = {"center": "middle"}.get(align.lower(), align) - size = size.split(",")[0] + size = str(float(size) * float(text_scale)) if width: width = ' width="%s" ' % width if height: @@ -170,7 +169,7 @@ def xml_shieldsymbolizer(path="", width="", height="", return """ [%s] """ % (icons_path, - path, width, height, face, int(float(size) * text_scale), color, halo_color, halo_radius, placement, offset, overlap, wrap_width, distance, align, opacity, transform, unlock_image, spacing, text) + path, width, height, face, size, color, halo_color, halo_radius, placement, offset, overlap, wrap_width, distance, align, opacity, transform, unlock_image, spacing, text) def xml_filter(string):