Commit d35189ec authored by H1Gdev's avatar H1Gdev Committed by mrbean-bremen
Browse files

Compatibility: Ignore textLength attribute if X attribute is list. (#374)

- ignore textLength attribute if X attribute is list
- add test images
parent 3bc78081
......@@ -349,11 +349,14 @@ namespace Svg
if (Math.Abs(diff) > 1.5)
{
if (this.LengthAdjust == SvgTextLengthAdjust.Spacing)
{
if (this.X.Count < 2)
{
origState.LetterSpacingAdjust = -1 * diff / (state.NumChars - origState.NumChars - 1);
SetPath(origState, false);
return;
}
}
else
{
using (var matrix = new Matrix())
......
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="80" height="80" xml:space="preserve">
<text x="10,30,50" y="15" fill="#000" font-size="14" >ABC</text>
<text x="10,30,50" y="30" fill="#000" font-size="14" textLength="14">ABC</text>
<text x="10,30,50" dx="4,4,4" y="45" fill="#000" font-size="14" textLength="14">ABC</text>
<text x="10" y="60" fill="#000" font-size="14" textLength="14">ABC</text>
<text y="75" fill="#000" font-size="14" textLength="14">ABC</text>
</svg>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment