View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016885 | Scribus | Scripter | public | 2023-01-06 23:48 | 2023-05-29 18:56 |
Reporter | zacl | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.8 | ||||
Fixed in Version | 1.6.0.svn | ||||
Summary | 0016885: Pdf export by python scripter embeds fonts which should be subsetted | ||||
Description | Export using CLI and python to-pdf.py 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 "pdf.save()" in "to-pdf-py" file. Problem : pdf.subsetList is not document and pdf.fonts is not enough documented. | ||||
Steps To Reproduce | 1. Install emoji ttf font : https://github.com/jslegers/emoji-icon-font/tree/master/fonts (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 to-pdf.py -- file.sla 5. open the created pdf and notice that the character is missing. | ||||
Additional Information | pdf.subsetList : https://github.com/scribusproject/scribus/blob/185141911977459c2399b96480f1345f1ff7fd44/scribus/plugins/scriptplugin/objpdffile.cpp#L1398 --- to-pdf-py --- import os import scribus if scribus.haveDoc() : filename = os.path.splitext(scribus.getDocName())[0] pdf = scribus.PDFfile() pdf.file = filename+".pdf" pdf.save() else : print("No file open") | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
Discused here https://forums.scribus.net/index.php/topic,4468.0.html |
|
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. |
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.6.0.svn |
2023-05-29 18:56 | cbradney | Status | resolved => closed |