[XeTeX] Controlling font embedding in PDF output

Werner LEMBERG wl at gnu.org
Fri Nov 16 07:30:47 CET 2018


> > Is there a simple option to make XeTeX (or rather xdvipdfmx) not
> > embed fonts in PDFs?  I'm going to post-process the output, which
> > will do the embedding.
>
> Perhaps it is easier to generate the PDF, then remove the embedded
> fonts?

Not for my use case, which is to include many PDFs (generated by
LilyPond) into a master PDF (generated by XeLaTeX).  The
post-processor (Ghostscript's ps2pdf script) should then compute
subsetted fonts for the whole document, which can make the final PDF
*a lot* smaller in comparison to the standard way because subsetted
fonts usually can't be merged.

In LilyPond I can control whether its output PDF gets generated
(1) the usual way (using subsetted fonts), (2) with embedded but not
subsetted fonts, or (3) without embedded fonts.  Ideally, I want
option (3) for XeTeX (and for pdfTeX and luatex also, BTW).  If this
isn't possible, I would like to enforce option (2) so that ps2pdf can
still do a decent job (at the cost of larger intermediate PDFs).


    Werner



More information about the XeTeX mailing list