Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml:space="preserve" not work #63

Open
similing4 opened this issue Dec 9, 2021 · 0 comments
Open

xml:space="preserve" not work #63

similing4 opened this issue Dec 9, 2021 · 0 comments
Labels

Comments

@similing4
Copy link

When I create a Text dom which start with spaces in svg with 'xml:space="preserve"' setting, the space not works:
SVG file opened in chrome:
t
The png rendered svg:
f
I have three space before text "Cap" not works.

<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 887.16 742.65">
    <title>1</title>
    <text transform="matrix(0.87, -0.64, 0.63, 0.78, 293.63, 552.1)" style="isolation:isolate;font-size:14.495826663827536px;font-family:Candelia;" xml:space="preserve">   </text>
    <text transform="matrix(0.47, -0.34, 0.59, 0.81, 334.48, 527.6)" style="isolation:isolate;font-size:22.870631244248315px;font-family:Candelia;" xml:space="preserve">   Cap</text>
    <text transform="matrix(0.54, -0.46, 0.65, 0.76, 388.75, 476.74)" style="isolation:isolate;font-size:19.589246204921178px;font-family:Candelia;" xml:space="preserve">t</text>
    <g style="isolation:isolate">
        <text transform="matrix(0.63, -0.25, 0.37, 0.93, 397.97, 473.2)" style="isolation:isolate;font-size:17.612450301856324px;font-family:Candelia;" xml:space="preserve">ion he</text>
    </g>
    <text transform="matrix(0.58, -0.05, 0.08, 1, 456.57, 452.34)" style="isolation:isolate;font-size:29.703132589027366px;font-family:Candelia;" xml:space="preserve">ad</text>
    <text transform="matrix(0.55, 0.1, -0.19, 0.98, 488.11, 443.25)" style="isolation:isolate;font-size:26.22822139574134px;font-family:Candelia;" xml:space="preserve">ing hea</text>
    <text transform="matrix(0.71, 0.38, -0.47, 0.88, 574.26, 458.55)" style="isolation:isolate;font-size:19.32429922780683px;font-family:Candelia;" xml:space="preserve">dline </text>
    <text transform="matrix(0.67, 0.38, -0.49, 0.87, 637.69, 489.21)" style="font-size:11.75326388463536px;font-family:Candelia;" xml:space="preserve">title     </text>
</svg>
@yisibl yisibl added the v1.0 label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants