Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
d35189ec
Commit
d35189ec
authored
Dec 19, 2018
by
H1Gdev
Committed by
mrbean-bremen
Dec 19, 2018
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
Changes
3
Show whitespace changes
Inline
Side-by-side
Source/Text/SvgTextBase.cs
View file @
d35189ec
...
...
@@ -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
())
...
...
Tests/W3CTestSuite/png/__pull_request-374-01.png
0 → 100644
View file @
d35189ec
824 Bytes
Tests/W3CTestSuite/svg/__pull_request-374-01.svg
0 → 100644
View file @
d35189ec
<?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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment