1.5-dev: Unexpected large and also incorrect PDF exports for clipped/masked text

Summary:

When I export a PDF for svg with clipped/masked text, the PDF file is large a lot than expected.

Steps to reproduce:

  • Open Inkscape
  • Create one line of text
  • Draw a rectangle over it
  • Select them all and "Set clip"
  • Export to PDF

What happened?

The PDF file has 1.1 MiB.

And, the generation is glitched:

image

What should have happened?

The PDF file should be at kB level.

Sample attachments:

For convenience I put the clip version and the mask version together within one SVG file (both clipping and masking produces the bug!):

drawing.svg

Additional notes

Compared with rsvg-convert and svg2pdf from Typst:

rsvg-convert:

~ ❯ rsvg-convert -f pdf  drawing.svg -o out.pdf; du -sh out.pdf                                                                                                                            23:00:32
Fontconfig warning: using without calling FcInit()
12K	out.pdf

PDF generation:

image

You can see the border is blurred. - Also buggy like.

svg2pdf

~ ❯ svg2pdf drawing.svg --dpi=96 out.pdf; du -sh out.pdf                                                                                                                                   23:00:37
12K	out.pdf

Also at ~12K.

Screenshot:

image

svg2pdf production is perfect - small PDF size and no blurry clip/mask borders.

Version info

Inkscape 1.5-dev (d8edb5a, 2025-11-09)

                      Compile  (Run)
    GLib version:     2.80.0
    GTK version:      4.14.5 (4.14.5)
    glibmm version:   2.78.1
    gtkmm version:    4.14.0
    libxml2 version:  2.9.14
    libxslt version:  1.1.39
    Cairo version:    1.18.0 (1.18.0)
    Pango version:    1.52.1 (1.52.1)
    HarfBuzz version: 8.3.0 (8.3.0)
    Poppler version:  24.02.0

    OS version:       Arch Linux