Code Monkey home page Code Monkey logo

Comments (7)

claudep avatar claudep commented on August 17, 2024 1

My initial diagnostic was not the good one, the issue was more perverse! Finding attributes from parents was short-circuited when the node had a style attribute.

from svglib.

claudep avatar claudep commented on August 17, 2024

Thanks for the report, I tracked the bug to the style attribute of <use> nodes not taken into account.
You might try the following patch:

diff --git a/svglib/svglib.py b/svglib/svglib.py
index 94dc293..c82e0ae 100755
--- a/svglib/svglib.py
+++ b/svglib/svglib.py
@@ -561,6 +561,7 @@ class SvgRenderer:
             # Append a copy of the referenced node as the <use> child (if not already done)
             node.append(copy.deepcopy(self.definitions[xlink_href[1:]]))
         self.renderNode(node.getchildren()[-1], parent=group)
+        self.shape_converter.applyStyleOnShape(group, node)
         getAttr = node.getAttribute
         transform = getAttr("transform")
         x, y = map(getAttr, ("x", "y"))

from svglib.

lmortimer avatar lmortimer commented on August 17, 2024

Thanks for fixing this. Could you give me an estimate of when you will publish a new release on pypi?

from svglib.

claudep avatar claudep commented on August 17, 2024

@deeplook is the releaser.

from svglib.

deeplook avatar deeplook commented on August 17, 2024

I am looking actively for some tool to help producing releases more quickly, because the less frequently I do it the more I forget about the entire process/procedure... Any suggestions are highly appreciated. I've found here and there some helpers used by some projects, but maybe I need to combine some of that.

from svglib.

claudep avatar claudep commented on August 17, 2024

Documenting the release process (for example in the Wiki, https://github.com/deeplook/svglib/wiki) could be a first step, because then people might suggest improvements/tools to improve the process.

from svglib.

deeplook avatar deeplook commented on August 17, 2024

Good idea. I rushed away and created this initial page: https://github.com/deeplook/svglib/wiki/Release-Process. Feel free to add to it, too...

from svglib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.