jperon / lyluatex

Alternative à lilypond-book pour lualatex
MIT License
58 stars 12 forks source link

Requesting support for lilypond option '-dgs-never-embed-fonts' #190

Closed lemzwerg closed 5 years ago

lemzwerg commented 6 years ago

I locally applied the following patch to lyluatex.lua:

--- lyluatex.lua.old    2018-04-06 15:11:45.000000000 +0200
+++ lyluatex.lua        2018-04-12 09:35:01.073661203 +0200
@@ -871,6 +871,7 @@
     local cmd = self.program.." "..
         "-dno-point-and-click "..
         "-djob-count=2 "..
+        "-dgs-never-embed-fonts "..
         "-dno-delete-intermediate-files "
     if self.input_file then
         cmd = cmd..'-I "'..dirname(self.input_file):gsub('%./', lfs.currentdir()..'/')..'" '

Removing tmp-ly, then calling lualatex on file foo.tex, I converted the PDF to its final form using ghostscript (tested with version 9.23):

gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=foo-final.pdf foo.pdf

Applying the above to my real-world document, the PDF size dropped from 1.2MByte to 300k (note that option optimize-pdf=true had virtually no effect).

I thus request that lyluatex provides support for this lilypond option.

jperon commented 5 years ago

@lemzwerg Could you please test branch fix-113 ?

Just add optimize-pdf=true, and if your lilypond supports it, it will be optimized for TeX-GS.