Bug report #11522

Most default SVG marker images rendering broken, border lines too thin, under QGIS 64-bit

Added by Mathieu Pellerin - nIRV over 8 years ago. Updated over 7 years ago.

Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19792


Under QGIS linux 64-bit, the rendering of most of the SVG marker images packaged with QGIS is broken. The rendering makes border lines wayy to thin. See attached screenshot (border-virtually-gone.png). If you set a large millimeter value for the border (say 10mm), you'll see the border rendering starting to emerge.

The odd thing in this is, QGIS linux 32-bit doesn't exhibit this issue.

This issue greatly affects the UX of default SVG markers.

border-virtually-gone.png (176 KB) Mathieu Pellerin - nIRV, 2014-10-29 10:34 PM

Associated revisions

Revision ab70ec99
Added by Nyall Dawson over 7 years ago

Scale svg marker outline width to match context

This is a partial fix for #11522, in that it fixes map unit scaling
for outline width. The width is still too small and incorrectly
scales with symbol size.

(refs #11522)

Revision 16f700a5
Added by Nyall Dawson over 7 years ago

Fix svg outline widths are incorrectly scaled (fix #11522)

SVG outline width sizes were not correctly calculated, and were
set to a constant value regardless of the rendered size of the svg
image. This meant that:
1. the rendered outline width was effectively randomly scaled
2. the width would change as the symbol size was modified

This change has some large flow on effects, eg:

- the large outline widths required to render an outline in <2.12
will now be drawn in their correct sizes, eg massive outlines. Projects
will need to be updated to reflect this.
- the default outline width set for the provided svg symbols (1 mm)
is much too large, so the symbols look bad with the default width.
This size needs to be modified in all the (~300 svg marker images)
- On the plus side, the long standing issue where most of the svg
symbols were rendered with white fill on white background and an
almost invisible black border is now fixed (refs #10908, #8538)


#1 Updated by Mathieu Pellerin - nIRV over 8 years ago

Well, the problem wasn't at all with the border size value.

After looking at my 32-bit build again (not sure why this didn't jump into my face before), the problem is with the default fill color of SVG markers under the 64-bit linux build. That is:
- Under a 32 linux build (or 32-bit & 64-bit osgeo4w builds), the default fill and border color values for SVG markers are both set to black
- Under a 64 linux build, the default fill color fails to be set to black, and instead is set to white, messing up with most default packaged SVG images

#2 Updated by Paolo Cavallini over 8 years ago

Confirmed here, quite annoying.

#3 Updated by Andreas Neumann over 7 years ago

It seems that these are bugs in the symbol definition, not in the software.

As an example:
in file svg/accommodation/accommodation_caravan_park.svg

<path fill="param(fill) #FFF" stroke="param(outline) #000" ...
FFF means a white fill.

It should be changed to:
<path fill="param(fill) #000" stroke="param(outline) #000" ...

It means that all these files that show to white by default must be changed back to black. Something for a script (with the risk of breaking one or another symbol that should have a default white fill) or a lot of boring work ...

#4 Updated by Nyall Dawson over 7 years ago

Second issue (fill color) is a duplicate of #10908. First issue (border width) is a valid issue under all platforms, and also means that width in map units has no effect.

#5 Updated by Nyall Dawson over 7 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF