Giter Site home page Giter Site logo

<use> element not supported about svgren HOT 6 CLOSED

cppfw avatar cppfw commented on July 30, 2024
element not supported

from svgren.

Comments (6)

JaimeIvanCervantes avatar JaimeIvanCervantes commented on July 30, 2024 1

Excellent, thanks! I'll open the new issue about <style> support.

Also, for text and truetype font support, I believe nanosvg is borrowing some ideas from an stb header only library called stb_truetype: https://github.com/nothings/stb

Maybe I could also look into basic text support.

from svgren.

igagis avatar igagis commented on July 30, 2024

Thanks for reporting this! I'll have a look next week. I'm currently on a trip without access to the computer.

from svgren.

igagis avatar igagis commented on July 30, 2024

I think 'use' support can be implemented and I will start working on it next week. But support of 'text', which is also present in your example, is not planned in the near future, because it is too complex and will require storing fonts somewhere.

from svgren.

JaimeIvanCervantes avatar JaimeIvanCervantes commented on July 30, 2024

Ok! By now I'm somewhat familiar with your library and I might have some time to help you next week so let me know ;)

from svgren.

igagis avatar igagis commented on July 30, 2024

@JaimeIvanCervantes
Ok, finally, the <use> element is now supported in svgdom 0.2.49 and svgren 0.4.23.
But your example also uses the <style> element which is not supported yet.
For <style> support please open a new bug. Support for <style> will require implementing CSS selectors logic (https://www.w3.org/TR/CSS2/selector.html), I might need help on that.

from svgren.

igagis avatar igagis commented on July 30, 2024

I am doing some refactoring right now, moving stuff to different files...

Regarding the truetype, I think it is not a problem to use freetype, the other thing is that along with SVG file one will have to supply the fonts also to render the image, so it will be more clumsy. For now I consider it is simpler to just convert text to geometry in your favourite SVG editor and live with it :).
But I'm open to consider proposals regarding text support if any.

from svgren.

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.