groff
[Top][All Lists]
Advanced

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

Re: [Groff] .PSPIC seems to be broken


From: Tadziu Hoffmann
Subject: Re: [Groff] .PSPIC seems to be broken
Date: Sun, 10 Feb 2013 14:09:22 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

> Today is 2013, not 1993.

Possibly :-)
But I still mistrust things I can't repair with a text editor.


> And CFF fonts, AFAIK, can't be embedded in hex form at all
> in PostScript files.

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".

I'm not sure whether the reverse is also true, but the
LCDF type tools contain a wonderful utility called cfftot1,
with which we can

  for file in /usr/share/lilypond/2.14.2/fonts/otf/*.otf
  do
    cfftot1 -a $file temp.pfa
    name=`sed -ne 's=/FontName /\(.*\) def=\1=p' temp.pfa`
    mv temp.pfa ~/lib/fonts/Type1/$name.pfa
  done

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. (So much
for the unimportance of the document structuring conventions
today.)  For this to work, the fonts must be listed in the
devps/download file, for example

  Emmentaler-20     ../../Type1/Emmentaler-20.pfa
  CenturySchL-Roma  ../../Type1/CenturySchL-Roma.pfa

Further notes:

 * Put \header { tagline = "" } into the lilypond file
   to get rid of the message at the bottom.
 * 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.
 * 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.

I guess many of the things should really be fixed by configuring
lilypond to produce output as needed for inclusion by groff,
but this is currently beyond my capabilities.  My script works
for Bernd's very simple demo file, and I'm not sure about more
complex output.





reply via email to

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