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

Fix SVG Serializer Color Issue #168

Closed
kayuri opened this issue Sep 28, 2017 · 1 comment
Closed

Fix SVG Serializer Color Issue #168

kayuri opened this issue Sep 28, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@kayuri
Copy link
Collaborator

kayuri commented Sep 28, 2017

Fill/stroke fill color is not serialized correctly.

Example:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
    <g font-family="Andalus,Diwani Letter,serif">
      <path d="M10,120 L470,120" stroke="#BBB"/>
      <path d="M10,240 L470,240" stroke="#BBB"/>
      <text text-anchor="middle" x="240" y="120" font-size="140" xml:lang="ar" fill="#700">&#1570;&#1604;&#1575;&#1578;</text>
      <text text-anchor="middle" x="240" y="240" font-size="140" xml:lang="ar" fill="#700">&#1579;&#1604;&#1575;&#1579;&#1577;</text>
</svg>

Parsed and serialized as:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
  <g>
        <path d="M 10 120L 470 120" fill="black" stroke="#000BBB" stroke-width="1.0"/>
        <path d="M 10 240L 470 240" fill="black" stroke="#000BBB" stroke-width="1.0"/>
        <text y="120" x="240" font-family="Andalus,Diwani Letter,serif" font-size="140" font-weight="normal" text-anchor="middle" fill="#000700">&#x622;&#x644;&#x627;&#x62A;</text>
        <text y="240" x="240" font-family="Andalus,Diwani Letter,serif" font-size="140" font-weight="normal" text-anchor="middle" fill="#000700">&#x62B;&#x644;&#x627;&#x62B;&#x629;</text>
      </g>
</svg>
@kayuri kayuri added the bug label Sep 28, 2017
@kayuri kayuri added this to the 0.9.1 milestone Sep 28, 2017
@kayuri kayuri self-assigned this Sep 28, 2017
@ystrot ystrot modified the milestones: 0.9.1, 0.9.x Nov 28, 2017
@f3dm76
Copy link
Collaborator

f3dm76 commented Jul 20, 2018

Now it is serialized to

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"  >
    <g>
        <g>
        <path  d="M 10 120L 470 120"  fill="black" stroke="#BBBBBB" stroke-width="1.0"/>
        <path  d="M 10 240L 470 240"  fill="black" stroke="#BBBBBB" stroke-width="1.0"/>
        <text    font-family="Andalus,Diwani Letter,serif" font-size="140"  font-weight="normal"  text-anchor="middle"  fill="#770000" transform="translate(240,120)" >آلات</text>
        <text    font-family="Andalus,Diwani Letter,serif" font-size="140"  font-weight="normal"  text-anchor="middle"  fill="#770000" transform="translate(240,240)" >ثلاثة</text>
    </g>
</g>
</svg>

Colors are fine. Vertical text alignment is not, but that's another issue #391

@f3dm76 f3dm76 closed this as completed Jul 20, 2018
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

3 participants