fskpf / svg2roughjs

Create sketchy, hand-drawn-like images from SVGs
https://fskpf.github.io/
MIT License
153 stars 13 forks source link

Stroked text is not rendered #35

Closed ygra closed 4 years ago

ygra commented 4 years ago
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360" viewBox="0 0 480 360" version="1.1" baseProfile="tiny">
    <text x="180" y="40" font-size="30">Text stroke</text>
    <g font-size="300" font-family="serif">
      <text x="60" y="280" fill="none" stroke="red" stroke-width="12">A</text>
      <text x="260" y="280" fill="none" stroke="navy" stroke-width="12">B</text>
    </g>
</svg>
ygra commented 4 years ago

Now strokes all text, which is not what we want.

ygra commented 4 years ago

style.stroke is none, when explicitly specified, but black in other cases? But aren't things unstroked by default? o.O

ygra commented 4 years ago

Ah, that's the code that strokes unstroked shapes with the fill color. Which looks much better for shapes that are hatched, but for text that's nonsense, obviously.