> But I still mistrust things I can't repair with a text editor. :-)
> According to Adobe, CFF fonts are "based on all of the same concepts > for drawing paths and hinting" as Type 1 fonts, and "a Type 1 font > can be converted into CFF/Type2 format, and back to Type 1 again, > without any loss of quality". Yeah, while correct for most fonts, this is not true in general. Type 1 -> Type 2 charstrings (as used in CFF fonts) always works, but Type 2 charstrings have some extensions like the `random' operator which isn't supported in Type 1 fonts. Well, othersubr #28 returns a random number (no idea where exactly this has been defined), but only othersubr #0-#4 are defined for Type 1. > With this in mind, I've attached a shell script that represents my > "fix" of the lilypond file import issue. It works by completely > removing the embedded fonts from the lilypond-generated Postscript > file and replacing them by corresponding %%IncludeResource comments, > which will later be resolved by grops's resource manager facility. There is another Lilypond option to let the fonts be loaded by GhostScript directly: lilypond --ps -dbackend=eps -dgs-load-fonts ... This uses GhostScript's `.loadfont' operator, making the section look like this on my GNU/Linux box: %%BeginProlog /lilypond-datadir where {pop} {userdict /lilypond-datadir (/usr/local/share/lilypond/2.17.11) put} ifelse %%BeginResource: font Emmentaler-11 lilypond-datadir (/fonts/otf/emmentaler-11.otf) concatstrings (r) file .loadfont %%EndResource A nice side effect is that the EPS files become much smaller, but of course they are no longer self-contained. Again, grops understands this just fine, but you *must* use GhostScript afterwards to further process the output file. > * Lilypond outputs a space character at the top left. Since I have > no experience with lilypond I don't know what generates this, and > my solution is to simply edit it out. IIRC, this is a bug which I haven't been able to catch yet (mostly due to time constraints). > * The rest of the script gets rid of the auto-positioning > and calls ghostscript to find the bounding box. Make sure > ghostscript also has access to the fonts. Using -dbackend=eps, you don't need this since a bounding box gets emitted. Werner