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

svg markers with svg files not defining viewBox fails to properly export, wrong outline size #21871

Closed
qgib opened this issue Nov 17, 2015 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Nov 17, 2015

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)
Original Redmine Issue: 13847
Affected QGIS version: master
Redmine category:symbology
Assignee: Nyall Dawson


A regressions slipped into QGIS master which leads to broken composer export of svg marker symbology when the svg file does not define a viewBox tag. As the dpi grows (or as you zoom into the composer sheet and refresh the map item canvas), the outline grows exponentially.

Steps to reproduce:

  1. Open the attached svg_viewport_issue test project
  2. Open the Composer 1
  3. Set the zoom level to 100%, and refresh the map item, the two svg markers should be more or less the same
  4. Set the zoom level to 400%, and refresh the map item, the outline of the svg marker to the right (the one with a viewBox-less svg file) is broken

Serious regression, let me know if I can do anything else to facilitate things.

(oups, somehow, my brain's wiring got viewBox <-> viewPort confused :) )


@qgib
Copy link
Contributor Author

qgib commented Nov 17, 2015

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


  • subject was changed from svg markers with svg files not defining viewPort fails to properly export, wrong outline size to svg markers with svg files not defining viewBox fails to properly export, wrong outline size

@qgib
Copy link
Contributor Author

qgib commented Jun 7, 2016

Author Name: Nyall Dawson (@nyalldawson)


Not a regression - this same behaviour has been present for < 2.14, and is caused by parameterised outline width in an svg which doesn't have a viewbox. There's no solution to this apart from fixing the svg and adding the viewbox. Without the viewbox, it's impossible to determine the actual size of the svg and scale the outline width parameter into the units required to match the svg dimensions.


  • resolution was changed from to invalid
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers labels May 25, 2019
@qgib qgib added this to the Version 2.14 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
signedav pushed a commit to signedav/QGIS that referenced this issue May 27, 2019
spatialthoughts pushed a commit to spatialthoughts/QGIS that referenced this issue Jun 10, 2019
spatialthoughts pushed a commit to spatialthoughts/QGIS that referenced this issue Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

1 participant