Bonsai: stop rasterizing fill-bg annotation text on PDF export

The "fill-background" SVG filter (used for EPset_Annotation.Classes =
fill-bg text backgrounds) merged the flood-filled background with the
text's own SourceGraphic via feMerge, even though the unfiltered text
is already drawn again as a separate, undamaged vector copy on top.
PDF has no native equivalent for SVG filter primitives, so any element
carrying a filter attribute gets rasterized on SVG-to-PDF conversion
(e.g. via Inkscape); merging the redundant SourceGraphic copy into that
raster produced the blurry/pixelated halo reported in #5719.

Dropping feMerge and keeping only feFlood still yields the same
bounding-box-sized background rectangle, without baking a second,
blurred copy of the glyphs into the rasterized output.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Petru Conduraru
2026-07-21 10:32:42 +03:00
parent e52e5e2e58
commit f643c18dc0
@@ -97,11 +97,7 @@
</g>
</marker>
<filter x="0" y="0" width="1" height="1" id="fill-background">
<feFlood flood-color="white" result="bg" />
<feMerge>
<feMergeNode in="bg"/>
<feMergeNode in="SourceGraphic"/>
</feMerge>
<feFlood flood-color="white" />
</filter>
</svg>

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB