PDF Export, subset all fonts settings

Previous topic - Next topic

Gibbz

Hi,

Im looking at subsetting my fonts to reduce filesize. In the export dialog there is a "subset all" button.
But in the python scripter api:

fontEmbedding = <attribute 'fontEmbedding' of 'PDFfile' objects>
Choose the font embedding mode :
0 - Embed fonts fully or as subset depending on 'fonts' attribute
1 - Outline fonts: fonts will be converted to vector
2 - No embedding: no font will be embedded.

fonts = <attribute 'fonts' of 'PDFfile' objects>
List of fonts to embed.


Is it possible to specify "All" for the fonts option?
Or is there a way to easily get a list of all fonts used to supply this option with?

Gibbz

I found the answer, just supply all fonts on the system:

pdf.fonts = scribus.getFontNames()

Gibbz

Ah it looks like this solution does not work.
Any other ideas?

a.l.e

as far as i can tell, you have to change the value in the fonts settings.

if i look in the API under "Font commands" i can find a getXFontNames (what a terrible name!) but i cannot find a way to set the value.
it should not be hard to add a command for setting the subsetting for a single font...

as an alternatvie, in the pdf "section" you can find a font attribute that tells what is supposed to be embedded: if any of the fonts are not subset, you can warn the user (or create a log file) asking the user / operator to change the setting.