Incorrect import of SVG paths #92713

Open
opened 2021-11-01 14:46:32 +01:00 by Álvaro Mondéjar · 17 comments

Blender Version
Broken: version: 3.1.0 Alpha
Worked: Never

Addon Information
Name: Scalable Vector Graphics (SVG) 1.1 format ()
Author: JM Soler, Sergey Sharybin

Short description of error
Hi everyone,

Developing simple-icons-blender add-on, I've noted that some SVG paths are not imported correctly.

I've done a comparison against Inkscape in the next video. In the row at the top there are the Blender representation of SVGs loaded with import_svg addon, in the row at the bottom there are PNGs converted from original SVGs with Inkscape included as plane materials.

failed-slugs.mp4

Note that these icons are created with common vector graphics programs, manually reviewed using the browser (on Github) and other vector graphics programs, and their paths have been linted, so I'm sure that this is a bug in Blender.

List of badly rendered icons:

Exact steps for others to reproduce the error

  • Download any of the listed "badly rendered icons"
  • Try to import using the indicated addon.
**Blender Version** Broken: version: 3.1.0 Alpha Worked: Never **Addon Information** Name: Scalable Vector Graphics (SVG) 1.1 format () Author: JM Soler, Sergey Sharybin **Short description of error** Hi everyone, Developing [simple-icons-blender](https://github.com/mondeja/simple-icons-blender) add-on, I've noted that some SVG paths are not imported correctly. I've done a comparison against Inkscape in the next video. In the row at the top there are the Blender representation of SVGs loaded with `import_svg` addon, in the row at the bottom there are PNGs converted from original SVGs with Inkscape included as plane materials. [failed-slugs.mp4](https://archive.blender.org/developer/F11659745/failed-slugs.mp4) Note that these icons are created with common vector graphics programs, manually reviewed using the browser (on [Github](https:*github.com/simple-icons/simple-icons)) and other vector graphics programs, and their paths [have been linted](https:*github.com/simple-icons/simple-icons/blob/e0df400494a32cadffb2bb7a7ddbaff6608239b0/.svglintrc.js), so I'm sure that this is a bug in Blender. ### List of badly rendered icons: - [500px - 500px](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/500px.svg) - [About.me - aboutdotme](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/aboutdotme.svg) - [Adafruit - adafruit](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/adafruit.svg) - [Airbnb - airbnb](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/airbnb.svg) - [Alitalia - alitalia](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/alitalia.svg) - [Amazon Fire TV - amazonfiretv](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/amazonfiretv.svg) - [Amazon Pay - amazonpay](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/amazonpay.svg) - [Amazon Prime - amazonprime](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/amazonprime.svg) - [American Express - americanexpress](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/americanexpress.svg) - [Angular - angular](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/angular.svg) - [AOL - aol](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/aol.svg) - [Apache - apache](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/apache.svg) - [Apache Airflow - apacheairflow](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/apacheairflow.svg) - [Apache Ant - apacheant](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/apacheant.svg) - [Apache Cassandra - apachecassandra](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/apachecassandra.svg) - [AppSignal - appsignal](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/appsignal.svg) - [Artifact Hub - artifacthub](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/artifacthub.svg) - [AT&T - atandt](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/atandt.svg) - [Audible - audible](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/audible.svg) - [Aurelia - aurelia](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/aurelia.svg) - [B&R Automation - bandrautomation](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/bandrautomation.svg) - [BBC - bbc](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/bbc.svg) - [Bitly - bitly](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/bitly.svg) - [Blender - blender](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/blender.svg) - [Boeing - boeing](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/boeing.svg) - [Bose - bose](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/bose.svg) - [BT - bt](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/bt.svg) - [Carrefour - carrefour](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/carrefour.svg) - [Cesium - cesium](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/cesium.svg) - [Chase - chase](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/chase.svg) - [Chevrolet - chevrolet](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/chevrolet.svg) - [China Southern Airlines - chinasouthernairlines](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/chinasouthernairlines.svg) - [Cisco - cisco](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/cisco.svg) - [Citroën - citroen](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/citroen.svg) - [Clyp - clyp](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/clyp.svg) - [CNN - cnn](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/cnn.svg) - [CodeChef - codechef](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/codechef.svg) - [Codecov - codecov](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/codecov.svg) - [CodeProject - codeproject](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/codeproject.svg) - [CodeSandbox - codesandbox](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/codesandbox.svg) - [Concourse - concourse](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/concourse.svg) - [Conda-Forge - condaforge](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/condaforge.svg) - [Counter-Strike - counterstrike](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/counterstrike.svg) - [Create React App - createreactapp](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/createreactapp.svg) - [CRYENGINE - cryengine](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/cryengine.svg) - [curl - curl](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/curl.svg) - [Dassault Systèmes - dassaultsystemes](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/dassaultsystemes.svg) - [Debian - debian](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/debian.svg) - [Dell - dell](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/dell.svg) - [Delphi - delphi](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/delphi.svg) - [Der Spiegel - derspiegel](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/derspiegel.svg) - [Designer News - designernews](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/designernews.svg) - [Docker - docker](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/docker.svg) - [Drooble - drooble](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/drooble.svg) - [Dropbox - dropbox](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/dropbox.svg) - [Drupal - drupal](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/drupal.svg) - [eBay - ebay](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/ebay.svg) - [Elastic - elastic](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/elastic.svg) - [Emirates - emirates](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/emirates.svg) - [Emlakjet - emlakjet](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/emlakjet.svg) - [ESLint - eslint](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/eslint.svg) - [Espressif - espressif](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/espressif.svg) - [Figma - figma](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/figma.svg) - [Freelancer - freelancer](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/freelancer.svg) - [Gerrit - gerrit](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/gerrit.svg) - [GNU IceCat - gnuicecat](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/gnuicecat.svg) - [Go - go](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/go.svg) - [GOG.com - gogdotcom](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/gogdotcom.svg) - [Google AdSense - googleadsense](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/googleadsense.svg) - [Google Assistant - googleassistant](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/googleassistant.svg) - [Google Cloud - googlecloud](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/googlecloud.svg) - [Google News - googlenews](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/googlenews.svg) - [Google Translate - googletranslate](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/googletranslate.svg) - [Grab - grab](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/grab.svg) - [GraphQL - graphql](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/graphql.svg) - [Grav - grav](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/grav.svg) - [GreenSock - greensock](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/greensock.svg) - [gulp - gulp](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/gulp.svg) - [Gutenberg - gutenberg](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/gutenberg.svg) - [Habr - habr](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/habr.svg) - [Hackster - hackster](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/hackster.svg) - [HappyCow - happycow](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/happycow.svg) - [Hilton - hilton](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/hilton.svg) - [HomeAdvisor - homeadvisor](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/homeadvisor.svg) - [Honda - honda](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/honda.svg) - [Hotels.com - hotelsdotcom](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/hotelsdotcom.svg) - [HubSpot - hubspot](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/hubspot.svg) - [Hyundai - hyundai](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/hyundai.svg) - [Icons8 - icons8](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/icons8.svg) - [Invoice Ninja - invoiceninja](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/invoiceninja.svg) - [Itch.io - itchdotio](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/itchdotio.svg) - [Jabber - jabber](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jabber.svg) - [Jasmine - jasmine](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jasmine.svg) - [JCB - jcb](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jcb.svg) - [Jeep - jeep](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jeep.svg) - [JET - jet](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jet.svg) - [JPEG - jpeg](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jpeg.svg) - [jQuery - jquery](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/jquery.svg) - [JUnit5 - junit5](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/junit5.svg) - [Keybase - keybase](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/keybase.svg) - [Kirby - kirby](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/kirby.svg) - [KnowledgeBase - knowledgebase](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/knowledgebase.svg) - [Lada - lada](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/lada.svg) - [Land Rover - landrover](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/landrover.svg) - [LBRY - lbry](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/lbry.svg) - [Linux - linux](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/linux.svg) - [Material Design - materialdesign](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/materialdesign.svg) - [Material Design Icons - materialdesignicons](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/materialdesignicons.svg) - [Max-Planck-Gesellschaft - maxplanckgesellschaft](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/maxplanckgesellschaft.svg) - [Mazda - mazda](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/mazda.svg) - [Metro de la Ciudad de México - metrodelaciudaddemexico](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/metrodelaciudaddemexico.svg) - [Microsoft Azure - microsoftazure](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/microsoftazure.svg) - [Microsoft Office - microsoftoffice](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/microsoftoffice.svg) - [Microsoft SQL Server - microsoftsqlserver](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/microsoftsqlserver.svg) - [Minetest - minetest](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/minetest.svg) - [MSI - msi](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/msi.svg) - [MYOB - myob](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/myob.svg) - [niconico - niconico](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/niconico.svg) - [Nintendo Network - nintendonetwork](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/nintendonetwork.svg) - [Nokia - nokia](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/nokia.svg) - [Noun Project - nounproject](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/nounproject.svg) - [NVIDIA - nvidia](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/nvidia.svg) - [OpenID - openid](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/openid.svg) - [Openlayers - openlayers](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/openlayers.svg) - [Opera - opera](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/opera.svg) - [PeerTube - peertube](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/peertube.svg) - [Pi-hole - pihole](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/pihole.svg) - [Pimcore - pimcore](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/pimcore.svg) - [PlayStation 5 - playstation5](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/playstation5.svg) - [PostCSS - postcss](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/postcss.svg) - [ProSieben - prosieben](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/prosieben.svg) - [Puppeteer - puppeteer](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/puppeteer.svg) - [Qatar Airways - qatarairways](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/qatarairways.svg) - [Qiskit - qiskit](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/qiskit.svg) - [Quip - quip](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/quip.svg) - [React - react](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/react.svg) - [ReactOS - reactos](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/reactos.svg) - [Red Hat - redhat](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/redhat.svg) - [Redbubble - redbubble](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/redbubble.svg) - [Reebok - reebok](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/reebok.svg) - [Ren'Py - renpy](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/renpy.svg) - [Robot Framework - robotframework](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/robotframework.svg) - [Roku - roku](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/roku.svg) - [Rotary International - rotaryinternational](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/rotaryinternational.svg) - [RStudio - rstudio](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/rstudio.svg) - [Safari - safari](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/safari.svg) - [Samsung - samsung](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/samsung.svg) - [San Francisco Municipal Railway - sanfranciscomunicipalrailway](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/sanfranciscomunicipalrailway.svg) - [Scania - scania](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/scania.svg) - [Sefaria - sefaria](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/sefaria.svg) - [Shopify - shopify](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/shopify.svg) - [Solus - solus](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/solus.svg) - [Sonos - sonos](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/sonos.svg) - [Splunk - splunk](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/splunk.svg) - [StackPath - stackpath](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/stackpath.svg) - [STARZ - starz](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/starz.svg) - [Tata - tata](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/tata.svg) - [TeamSpeak - teamspeak](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/teamspeak.svg) - [Tekton - tekton](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/tekton.svg) - [Tidal - tidal](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/tidal.svg) - [Tide - tide](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/tide.svg) - [TYPO3 - typo3](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/typo3.svg) - [Under Armour - underarmour](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/underarmour.svg) - [Vivino - vivino](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/vivino.svg) - [Volkswagen - volkswagen](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/volkswagen.svg) - [Webmin - webmin](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/webmin.svg) - [WhatsApp - whatsapp](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/whatsapp.svg) - [Windi CSS - windicss](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/windicss.svg) - [Windows - windows](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/windows.svg) - [Wistia - wistia](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/wistia.svg) - [Wolfram Language - wolframlanguage](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/wolframlanguage.svg) - [WooCommerce - woocommerce](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/woocommerce.svg) - [WordPress - wordpress](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/wordpress.svg) - [Wwise - wwise](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/wwise.svg) - [ZDF - zdf](https://github.com/simple-icons/simple-icons/blob/3fdcb11536ef0356f3f84594fbee835531bcd05b/icons/zdf.svg) **Exact steps for others to reproduce the error** - Download any of the listed "badly rendered icons" - Try to import using the indicated addon.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @mondeja

Added subscriber: @mondeja

Added subscriber: @discostu

Added subscriber: @discostu

Is this related to the fact that many SVGs import at a very small scale?

Is this related to the fact that many SVGs import at a very small scale?

Added subscriber: @jenkm

Added subscriber: @jenkm

@mondeja - one or two svg examples and one screenshot are enough.


The issue here is that the svg path is not closed.
I would say that Blender imports the file correctly (as it is) and the svg itself is incorrect.

C-broken.svg

C-fixed.svg

C-fix.png


For example, this svg, is completely broken:

angular.png

@mondeja - one or two svg examples and one screenshot are enough. *** The issue here is that the svg path is not closed. I would say that Blender imports the file correctly (as it is) and the svg itself is incorrect. ![C-broken.svg](https://archive.blender.org/developer/F12678376/C-broken.svg) ![C-fixed.svg](https://archive.blender.org/developer/F12678377/C-fixed.svg) ![C-fix.png](https://archive.blender.org/developer/F12678378/C-fix.png) *** For example, this svg, is completely broken: ![angular.png](https://archive.blender.org/developer/F12678478/angular.png)

Changed status from 'Confirmed' to: 'Needs Triage'

Changed status from 'Confirmed' to: 'Needs Triage'

@jenkm I think the confusion for the users here is that most other software seems to be more forgiving for incorrect svgs. I tried, Illustrator, Sketch, a web browser, and Affinity Designer and they each rendered the Angular svg as expected. I wonder if there could be an import option to correct svgs such as closing open paths.

The other thing I've noticed with importing SVGs is they come in very very small and the user is required to scale them up 80x or more. In looking at the source code I see that it only scales if the width and height have units in this list:

if len(viewbox) == 4 and unit in ('cm', 'mm', 'in', 'pt', 'pc'):

In my experience SVGs never specify unit. I wonder if they could default to pt?

@jenkm I think the confusion for the users here is that most other software seems to be more forgiving for incorrect svgs. I tried, Illustrator, Sketch, a web browser, and Affinity Designer and they each rendered the Angular svg as expected. I wonder if there could be an import option to correct svgs such as closing open paths. The other thing I've noticed with importing SVGs is they come in very very small and the user is required to scale them up 80x or more. In looking at the source code I see that it only scales if the width and height have units in this list: ``` if len(viewbox) == 4 and unit in ('cm', 'mm', 'in', 'pt', 'pc'): ``` In my experience SVGs never specify unit. I wonder if they could default to pt?

Thanks for the feedback @jenkm, but I think that your answer does not conform with the SVG specification. In "Specifying fill paint: the ‘fill’ property" the specification says:

The fill operation fills open subpaths by performing the fill operation as if an additional "closepath" command were added to the path to connect the last point of the subpath with the first point of the subpath. Thus, fill operations apply to both open subpaths within ‘path’ elements (i.e., subpaths without a closepath command) and ‘polyline’ elements.

So there is no need to close the subpath explicitly with a closepath (z/Z) command to define the fill behaviour, it only affects at how stroke-linecap and stroke-linejoin properties are applied. In The "closepath" command, the specification points that:

A closed subpath must be closed with a "closepath" command, this "joins" the first and last path segments. Any other path is an open subpath.

A closed subpath differs in behavior from an open subpath whose final coordinate is the initial point of the subpath. The first and last path segments of an open subpath will not be joined, even when the final coordinate of the last path segment is the initial point of the subpath. This will result in the first and last path segments being capped using the current value of stroke-linecap rather than joined using the current value of stroke-linejoin.

Blender is differing here from the specification compared with other softwares.

Thanks for the feedback @jenkm, but I think that your answer does not conform with the SVG specification. In ["Specifying fill paint: the ‘fill’ property"](https://www.w3.org/TR/SVG/painting.html#SpecifyingFillPaint) the specification says: > The fill operation fills [open subpaths](https:*www.w3.org/TR/SVG/paths.html#TermClosedSubpath) by performing the fill operation as if an additional "closepath" command were added to the path to connect the last point of the subpath with the first point of the subpath. Thus, fill operations apply to both [open subpaths](https:*www.w3.org/TR/SVG/paths.html#TermClosedSubpath) within [‘path’](https:*www.w3.org/TR/SVG/paths.html#PathElement) elements (i.e., subpaths without a closepath command) and [‘polyline’](https:*www.w3.org/TR/SVG/shapes.html#PolylineElement) elements. So there is no need to close the subpath explicitly with a closepath (`z`/`Z`) command to define the fill behaviour, it only affects at how `stroke-linecap` and `stroke-linejoin` properties are applied. In [The "closepath" command](https://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand), the specification points that: > A closed subpath must be closed with a "closepath" command, this "joins" the first and last path segments. Any other path is an open subpath. > A closed subpath differs in behavior from an open subpath whose final coordinate is the initial point of the subpath. The first and last path segments of an open subpath will not be joined, even when the final coordinate of the last path segment is the initial point of the subpath. This will result in the first and last path segments being capped using the current value of stroke-linecap rather than joined using the current value of stroke-linejoin. Blender is differing here from the specification compared with other softwares.

Added subscriber: @Sergey

Added subscriber: @Sergey

Of course you are right that svg supports such a thing and it works in other programs. I basically meant that Blender is not a vector editor, it just converts svg into its own format, which works differently, i.e. not all svg features can be supported. It is often necessary to prepare files specifically before importing them into another program.

This can probably be fixed/improved, perhaps @Sergey can comment on this.

Of course you are right that svg supports such a thing and it works in other programs. I basically meant that Blender is not a vector editor, it just converts svg into its own format, which works differently, i.e. not all svg features can be supported. It is often necessary to prepare files specifically before importing them into another program. This can probably be fixed/improved, perhaps @Sergey can comment on this.

Blender's SVG addon implements a rather small subset of SVG 1.1 specification. Styling is very limited (i.e. filters and such are ignored). The tessellation is Relying on the way how 2D curves are tessellated. Think best description would be: main goal is to get paths into Blender, and final look of non-trivial images is not considered to be a priority. Making a good/proper SVG importer is a big project on its own, not something we had capacitance for.

In looking at the source code I see that it only scales if the width and height have units in this list:

That't the viewbox handling code. Weirdly, its unit is derived from document height.

Having paths with points without unit should be possible, although it is not impossible there is a mistake somewhere in the way we calculate transform.

I'm not sure why wrong scale would cause bad icon. To me there is a difference between icon being wrong size and icon missing its elements. Or is it because some of the parts of icon are scaled wrongly, making them invisible?

Top make the report manageable we need a simple SVG file which indicates specific problem. If there is a simple SVG demonstrating wrong scale or wrong path shape we can look into it.

Blender's SVG addon implements a rather small subset of SVG 1.1 specification. Styling is very limited (i.e. filters and such are ignored). The tessellation is Relying on the way how 2D curves are tessellated. Think best description would be: main goal is to get paths into Blender, and final look of non-trivial images is not considered to be a priority. Making a good/proper SVG importer is a big project on its own, not something we had capacitance for. > In looking at the source code I see that it only scales if the width and height have units in this list: That't the viewbox handling code. Weirdly, its unit is derived from document height. Having paths with points without unit should be possible, although it is not impossible there is a mistake somewhere in the way we calculate transform. I'm not sure why wrong scale would cause bad icon. To me there is a difference between icon being wrong size and icon missing its elements. Or is it because some of the parts of icon are scaled wrongly, making them invisible? Top make the report manageable we need a simple SVG file which indicates specific problem. If there is a simple SVG demonstrating wrong scale or wrong path shape we can look into it.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @Lin-Hsu

Added subscriber: @Lin-Hsu

D16143 can fix some broken paths, like the following PeerTube icon.

before now
before.png after.png

But some icons are still incomplete due to other issues, like the following NVIDIA icon.

before now
nvidia.before.png nvidia.now.png
[D16143](https://archive.blender.org/developer/D16143) can fix some broken paths, like the following PeerTube icon. | before | now | -- | -- | | ![before.png](https://archive.blender.org/developer/F13615071/before.png) | ![after.png](https://archive.blender.org/developer/F13615072/after.png) But some icons are still incomplete due to other issues, like the following NVIDIA icon. | before | now | -- | -- | | ![nvidia.before.png](https://archive.blender.org/developer/F13615114/nvidia.before.png) | ![nvidia.now.png](https://archive.blender.org/developer/F13615115/nvidia.now.png)

With D16143 committed, I rechecked all the badly rendered icons that Álvaro listed.

There are 3 images for each icon: Blender rendering, CairoSVG rendering, abs(diff).
The number is the MSE of the pixels with alpha !=0 and alpha != 1 in both renderings. These pixels are borders which are all that matters for such icons.
Icons with MSE > 0.0004 are treated as broken and are framed with red.

curve resolution 12 (default) 64
image Cycles.res_12.all_icons.MSE_border_0.0004_82.no_alpha.png Cycles.res_64.all_icons.MSE_border_0.0004_82.no_alpha.png
#broken icons 82 82

Please note that the sets of broken icons are different for the 2 resolutions, though the counts are the same.

I'll try to fix the remaining issues...

With [D16143](https://archive.blender.org/developer/D16143) committed, I rechecked all the badly rendered icons that Álvaro listed. There are 3 images for each icon: Blender rendering, CairoSVG rendering, abs(diff). The number is the MSE of the pixels with alpha !=0 and alpha != 1 in both renderings. These pixels are borders which are all that matters for such icons. Icons with MSE > 0.0004 are treated as broken and are framed with red. | curve resolution | 12 (default) | 64 | -- | -- | -- | | image | ![Cycles.res_12.all_icons.MSE_border_0.0004_82.no_alpha.png](https://archive.blender.org/developer/F13640129/Cycles.res_12.all_icons.MSE_border_0.0004_82.no_alpha.png) | ![Cycles.res_64.all_icons.MSE_border_0.0004_82.no_alpha.png](https://archive.blender.org/developer/F13640133/Cycles.res_64.all_icons.MSE_border_0.0004_82.no_alpha.png) | #broken icons | 82 | 82 Please note that the sets of broken icons are different for the 2 resolutions, though the counts are the same. I'll try to fix the remaining issues...

With D16198, more icons are fixed.

curve resolution 12 (default) 64
image Cycles.res_12.all_icons.MSE_border_0.0004_72.no_alpha.png Cycles.res_64.all_icons.MSE_border_0.0004_71.no_alpha.png
#broken icons 72 71
With [D16198](https://archive.blender.org/developer/D16198), more icons are fixed. | curve resolution | 12 (default) | 64 | -- | -- | -- | | image | ![Cycles.res_12.all_icons.MSE_border_0.0004_72.no_alpha.png](https://archive.blender.org/developer/F13642185/Cycles.res_12.all_icons.MSE_border_0.0004_72.no_alpha.png) | ![Cycles.res_64.all_icons.MSE_border_0.0004_71.no_alpha.png](https://archive.blender.org/developer/F13642187/Cycles.res_64.all_icons.MSE_border_0.0004_71.no_alpha.png) | #broken icons | 72 | 71
Sign in to join this conversation.
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#92713
No description provided.