linebender / resvg

An SVG rendering library.
Apache License 2.0
2.86k stars 228 forks source link

Text shaping across tspan #245

Open JoKalliauer opened 4 years ago

JoKalliauer commented 4 years ago
svg ink resvg rsvg
svg Fonttest-Kerning Fonttest-Kerning_re Fonttest-Kerning_r

imho text kerning should be identical to inkscape

source: https://commons.wikimedia.org/wiki/File:Fonttest-Kerning.svg

author Hk kng

license Public Domain

RazrFalcon commented 4 years ago

Look like I've missed this part from the SVG spec:

Ligature formation should not be enabled for the glyphs corresponding to characters within different DOM text nodes; thus, characters separated by markup should not use ligatures.

But I'm not sure if this results are produces by ligatures. This is just kerning, which should not be disabled according to the spec. So I don't know what is the correct result.

I will investigate it more later, but for now it looks like https://github.com/w3c/svgwg/issues/634, aka undefined behavior.

PS: Firefox has the same bug.