[XeTeX] Controlling font embedding in PDF output

Werner LEMBERG wl at gnu.org
Fri Nov 16 22:23:39 CET 2018


>> 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.
> 
> Are you sure that this is even feasible, in that the same characters
> are referred to in the same way, in each of the Lilypond PDFs?

Yes.

>> 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).
> 
> If you can get this to work, I'd be very interested in the
> technique.

Right now, ps2pdf is already able to merge the fonts used in
LilyPond's PDFs.  Together with the `extractpdfmark' tool (to preserve
page mode, named destinations, etc.) our final PDFs are just fine.
However, I would like to improve this further to handle the fonts in
the XeTeX PDFs also.


    Werner


More information about the XeTeX mailing list