I make the following path for the letter T in cairo:
ctx = cairo.Context(surface)
ctx.text_path("T")
ctx.close_path()
c = ctx.copy_path()
print(c) gives me:
move_to 5.980469 -7.171875
line_to 5.980469 -6.320312
line_to 3.562500 -6.320312
line_to 3.562500 0.000000
line_to 2.578125 0.000000
line_to 2.578125 -6.320312
line_to 0.160156 -6.320312
line_to 0.160156 -7.171875
close path
move_to 6.109375 0.000000
close path
move_to 6.109375 0.000000
and I would like to get it in SVG path syntax in the form:
M216.88,153.42l-44.63.12,0-16.1,108.61-.29,0,16.1-44.83.12L236.37,284l-19.14.05Z
... so that I can import it using svgpath2mpl.parse_path.