lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ANN: Pygments support for LilyPond


From: Jean Abou Samra
Subject: Re: ANN: Pygments support for LilyPond
Date: Sat, 27 Nov 2021 22:59:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1



Le 27/11/2021 à 17:36, Jean Abou Samra a écrit :
I tried this solution, and I am experiencing a few
problems. For one thing, Firefox doesn't render the
bold typewriter fonts as bold (this is not happening
in your pygments.pdf, but, for reasons I don't understand,
it happens with the doc build). Also, when extractpdfmark
is used and the TeX engine is XeTeX, GhostScript gives
errors:

Making Documentation/out-www/en/changes.pdf < texi
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.

In this case, even Evince doesn't render the bold.
See the attached PDFs, without-extractpdfmark.pdf and
after-extractpdfmark-and-gs.pdf. (You'll find the
extractpdfmark and gs invocations in Documentation/GNUmakefile.)
The only difference is in the invocation, either
'make -C Documentation out=www out-www/en/changes.pdf' or
'make -C Documentation out=www USE_EXTRACTPDFMARK=no out-www/en/changes.pdf'.
(In my environment, XeTeX is being used by default.)

Also, the bold text looks a bit 'hirsute' when zomming out
in Evince. I guess that's the hinting issue you mentioned.
I tried to reduce the boldness by changing the value 0.2
in common-macros.itexi but it didn't have an effect -- I
wonder what's going on.

Any ideas? You can reproduce all this by checking out
my branch (if you visit the merge request, GitLab
gives you command-line instructions in 'Check out branch').


I am not sure how I wrote this. For the most part,
it is plain wrong. I must have messed up in my tests.

So, the real story is that a specific combination
triggers the problem: XeTeX and extractpdfmark.
Here is a standalone reproducer: take your file
pygments.texinfo, and run

PDFTEX=xetex texi2pdf -o pygments-initial.pdf pygments.texinfo && extractpdfmark -o pygments.pdfmark pygments-initial.pdf && gs -dBATCH -dNOSAFER -dNOPAUSE -sDEVICE=pdfwrite -dAutoRotatePages=/None -dPrinted=false -sOutputFile=pygments-after-gs.pdf -c "30000000 setvmthreshold" -I out-fonts/ -I out-fonts/Font pygments.pdfmark pygments-initial.pdf

(I am not sure why having built LilyPond and passing
"-I out-fonts -I out-fonts/Font" to gs is necessary.)

Without PDFTEX=xetex, all is fine. With it, you should get

GPL Ghostscript 9.54.0 (2021-03-30)
Copyright (C) 2021 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 1.
Page 1
   **** Error: File did not complete the page properly and may be damaged.
               Output may be incorrect.

and the file pygments-after-gs.pdf, created from pygments-initial.pdf
through gs, will not display bold.

Also, forget about Firefox not displaying the bold glyphs.
It actually does, but much more lightly, which is why I
didn't notice it.

Best,
Jean



reply via email to

[Prev in Thread] Current Thread [Next in Thread]