Exporting to PDF/X1a via scribus API and outlined fonts crashes (signal 11)

Previous topic - Next topic

maple

As a volunteer I am preparing a small magazine. As a former programmer with little time, I prefer to have things scripted so as not to forget anything and to be precise. I export several versions: draft with images, draft without images, web final (PDF 1.5, sRGB, with links, embed/subset fonts), print version (no links, no transparency, CMYK, bleeds, crop marks, outline fonts). Print shop prefers PDF/X1a, but can handle PDF 1.3 and also PDF 1.4, but then needs to fix things and process is slower (I need to confirm results).

I have Python scripts for each export that run Scribus from the command line. To be consistent and not forget any parameters. Print export example:

scribus.openDoc(filein)
pdf = scribus.PDFfile()
pdf.file = fileout
pdf.version = 11 # PDF/X1a
pdf.fontEmbedding = 1 # outline
pdf.outdst = 1 # print
pdf.pageLayout = 3 # face right first
pdf.quality = 0 # quality of embedding objects
pdf.registrationMarks = False
pdf.colorMarks = False
pdf.bleedMarks = True
pdf.useDocBleeds = True
pdf.markOffset = 3 # mark offset
pdf.docInfoMarks = True
pdf.noembicc = True # do not use embedded ICC profiles
pdf.save()
scribus.closeDoc()
But I ran into a problem with outlining fonts with PD/X1a. Something is wrong with a sans serif face and I cannot find the reason. When I set the output to PDF 1.3, everything is fine. When I set PDF/X1a, Scribus does not outline but subset (not sure why) and crashes on OpenSans (signal 11). See output:

pdf font "Lexend Bold"
"/Fo0" uses method "Subset" and encoding 0
pdf font "Lexend Regular"
"/Fo1" uses method "Subset" and encoding 0
pdf font "Lexend SemiBold"
"/Fo2" uses method "Subset" and encoding 0
pdf font "Noto Serif Regular"
"/Fo3" uses method "Subset" and encoding 0
pdf font "Poppins Bold"
"/Fo4" uses method "Subset" and encoding 0
pdf font "Poppins SemiBold"
"/Fo5" uses method "Subset" and encoding 0
pdf font "Roboto Bold"
"/Fo6" uses method "Subset" and encoding 0
pdf font "Roboto Italic"
"/Fo7" uses method "Subset" and encoding 0
pdf font "Roboto Regular"
Scribus Crash
-------------
Scribus crashes due to Signal #11

I have tried replacing the font with NotoSans and now I am using Roboto. Still the same result with all three. The fonts are Google fonts and are not variable size. Only the regular version causes problems. Bold and italics are fine. I have tried removing pages to find out what is wrong, if it is some toxic glyph. Nothing happened. Many hours of trial and error :-)

I am running Scribus Appimage on Debian 12, versions 1.6.3 and 1.7.0, both with the same result. It would be nice if I could put Scribus into some sort of debug mode to better find out what is wrong - and then file a bug. I would be happy to help with this investigation. Or maybe I am doing something wrong.