Text() attribute styling/spacing
There are issues with how `Text()` is generated, regarding both spacing and the use of `style`...at least when viewing in Chrome browser.

Examples:
```
canvas.Text(300, 150, "Some Text", "font-size:48px;", `fill="#222222"`)
<text x="300" y="150" style="font-size:48px;"fill="#222222" >Some Text</text>

canvas.Text(300, 150, "Some Text", "font-size:48px;", "fill:white")
<text x="300" y="150" style="font-size:48px;" style="fill:white">Some Text</text>
```

In the first example, you can see that the `fill` attribute has no spacing before it which in Chrome, produces an `attributes construct error` message. Also, there is an unnecessary space before the closing `>`.

In the second example (after manually inserting that space before `style`) I get an `Attribute style redefined` message.

This is fixed very easily in `endstyle()`, which would also benefit from a little refactoring.