View Issue Details

IDProjectCategoryView StatusLast Update
0016885ScribusScripterpublic2023-01-07 22:22
Reporterzacl Assigned Tojghali  
Status resolvedResolutionfixed 
Product Version1.5.8 
Fixed in Version1.5.9.svn 
Summary0016885: Pdf export by python scripter embeds fonts which should be subsetted
DescriptionExport using CLI and python script don't embed fonts used in sla.
Character using a downloaded font don't appear on the generated pdf.

Expect : Font to be embeded in pdf like when I export manually in scribus (File->Export->PDF/save). Scribus in the export windows find automaticly which font are to embed and subset

Solution I used instead :
1. export in pdf manually in scribus and save sla. Subset font infos are saved in SLA (e.g. <Subset Name="emoji Regular"/>) . Thanks to that, CLI export works.
2. insert manually font name to be subset in python export script. => e.g. "pdf.subsetList = ["emoji Regular"]" before "" in "to-pdf-py" file. Problem : pdf.subsetList is not document and pdf.fonts is not enough documented.
Steps To Reproduce1. Install emoji ttf font : (or other font)
2. Create a new scribus file.
3. In a text box insert die � (U+1F3B2) unicode character using ttf emoji font and save it. (or other charachter)
4. Run : scribus -g -py -- file.sla
5. open the created pdf and notice that the character is missing.

Additional Informationpdf.subsetList :

import os
import scribus

if scribus.haveDoc() :
    filename = os.path.splitext(scribus.getDocName())[0]
    pdf = scribus.PDFfile()
    pdf.file = filename+".pdf"
else :
    print("No file open")
TagsNo tags attached.



2023-01-06 23:52

reporter   ~0049855

Discused here,4468.0.html


2023-01-07 21:21

administrator   ~0049860

Last edited: 2023-01-07 22:16

Well in fact, the problem is not that Scribus does not embed fonts. In fact in this case the problem is that Scribus does fully embed emoji font instead of subsetting it. The emoji fonts has an incomplete PostScript glyph names table and that case should trigger font subsetting. This is what happens normally when going through PDF export dialog.

Issue History

Date Modified Username Field Change
2023-01-06 23:48 zacl New Issue
2023-01-06 23:52 zacl Note Added: 0049855
2023-01-07 21:21 jghali Note Added: 0049860
2023-01-07 21:22 jghali Summary Pdf export by python scripter does not embed Font => Pdf export by python scripter embeds fonts which should be subsetted
2023-01-07 21:22 jghali Note Edited: 0049860
2023-01-07 21:26 jghali Note Edited: 0049860
2023-01-07 22:16 jghali Note Edited: 0049860
2023-01-07 22:22 jghali Assigned To => jghali
2023-01-07 22:22 jghali Status new => resolved
2023-01-07 22:22 jghali Resolution open => fixed
2023-01-07 22:22 jghali Fixed in Version => 1.5.9.svn