groff-commit
[Top][All Lists]
Advanced

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

[groff] 15/15: [build]: Add Automake `HAVE_URW_FONTS` condition.


From: G. Branden Robinson
Subject: [groff] 15/15: [build]: Add Automake `HAVE_URW_FONTS` condition.
Date: Fri, 3 Jun 2022 05:04:53 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit bf25f7ebf35c9ab384455edb1612494b4af46817
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jun 3 00:51:03 2022 -0500

    [build]: Add Automake `HAVE_URW_FONTS` condition.
    
    * configure.ac: Add `AM_CONDITIONAL`: `HAVE_URW_FONTS`, so our Automake
      files can more easily cope with their absence.
    
    * contrib/mom/mom.am (MOMPROCESSEDEXAMPLEFILES): Include
      "typesetting.pdf" only if `HAVE_URW_FONTS`, since the document demands
      them.
    
    * font/devpdf/Foundry.in: Add easily matched phrases to comments, to
      clearly delimit the URW foundry portion of the file so it can be
      omitted if those fonts are absent.
    
    * font/devpdf/devpdf.am (font/devpdf/Foundry): Generate file differently
      depending on `HAVE_URW_FONTS`; keep the existing procedure if true,
      and delete the URW section from the generated file otherwise, avoiding
      diagnostic messages from afmtodit(1) and our BuildFoundries script.
    
    Also update comments in Foundry.in file to be more helpful.
---
 ChangeLog              | 13 +++++++++++++
 configure.ac           |  1 +
 contrib/mom/ChangeLog  |  5 +++++
 contrib/mom/mom.am     |  4 +++-
 font/devpdf/Foundry.in | 32 ++++++++++++++++++++------------
 font/devpdf/devpdf.am  |  7 ++++++-
 6 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a7a54133..64c55cf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-06-03  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * configure.ac: Add `AM_CONDITIONAL`: `HAVE_URW_FONTS`, so our
+       Automake files can more easily cope with their absence.
+       * font/devpdf/Foundry.in: Add easily matched phrases to
+       comments, to clearly delimit the URW foundry portion of the file
+       so it can be omitted if those fonts are absent.
+       * font/devpdf/devpdf.am (font/devpdf/Foundry): Generate file
+       differently depending on `HAVE_URW_FONTS`; keep the existing
+       procedure if true, and delete the URW section from the generated
+       file otherwise, avoiding diagnostic messages from afmtodit(1)
+       and our BuildFoundries script.
+
 2022-06-03  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * font/devpdf/devpdf.am (font/devpdf/util/BuildFoundries):
diff --git a/configure.ac b/configure.ac
index 6090971c..26a24366 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,7 @@ AM_CONDITIONAL([USE_GROHTML], [test "$use_grohtml" = yes])
 AM_CONDITIONAL([USE_GROPDF], [test "$use_gropdf" = yes])
 AM_CONDITIONAL([USE_GROFF_ALLOCATOR],
                [test "$groff_use_own_allocator" = yes])
+AM_CONDITIONAL([HAVE_URW_FONTS], [test "$groff_have_urw_fonts" = yes ])
 AM_CONDITIONAL([HAVE_PDFTOOLS], [test "$groff_have_pdftools" = yes ])
 AM_CONDITIONAL([HAVE_TEXI2DVI], [test "$groff_have_texi2dvi" = yes ])
 
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index e87d8811..d0729809 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,8 @@
+2022-05-20  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * mom.am (MOMPROCESSEDEXAMPLEFILES): Include "typesetting.pdf"
+       only if `HAVE_URW_FONTS`, since the document demands them.
+
 2022-05-20  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * mom.am: Rename `BUILD_PDFDOC` to `USE_GROPDF`.
diff --git a/contrib/mom/mom.am b/contrib/mom/mom.am
index fc8feaf1..62127b08 100644
--- a/contrib/mom/mom.am
+++ b/contrib/mom/mom.am
@@ -93,10 +93,12 @@ MOMPROCESSEDEXAMPLEFILES = \
   contrib/mom/examples/mom-pdf.pdf \
   contrib/mom/examples/mon_premier_doc.pdf \
   contrib/mom/examples/sample_docs.pdf \
-  contrib/mom/examples/typesetting.pdf \
   contrib/mom/examples/slide-demo.pdf \
   contrib/mom/examples/copyright-default.pdf \
   contrib/mom/examples/copyright-chapter.pdf
+if HAVE_URW_FONTS
+MOMPROCESSEDEXAMPLEFILES += contrib/mom/examples/typesetting.pdf
+endif
 momprocessedexampledir = $(exampledir)/mom
 nodist_momprocessedexample_DATA = $(MOMPROCESSEDEXAMPLEFILES)
 
diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in
index ab364150..beab4221 100644
--- a/font/devpdf/Foundry.in
+++ b/font/devpdf/Foundry.in
@@ -10,21 +10,26 @@
 # Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-#=====================================================================
-#Foundry|Name|Searchpath
+#=======================================================================
+#Foundry|Name|Search path
 foundry||(gs)
 
-# These are just copies of the grops fonts so MUST not have any flags etc set
+# Enable the font description files for grops (generated from Adobe
+# foundry font files) to be used with gropdf.  afmtodit must not be
+# called with any flags.  URW fonts are substituted for Adobe fonts in
+# the download file by default.  If you have Adobe Type 1 fonts, you can
+# update the foundry search path above if necessary and replace the
+# contents of the file fields below with their file names.
 
-#Font|IsBase14|Flags|Map|Encoding|File(!file...)
+#Font|IsBase14|Flags|Map|Encoding|File(!file)...
 AB|N||||URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
 
ABI|N||||URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
 
AI|N||||URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
@@ -62,18 +67,21 @@ 
ZCMI|N||||Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.
 ZD|Y||||D050000L!D050000L.t1!Dingbats!d050000l.pfb
 EURO|N||||*../devps/freeeuro.pfa
 
-#======================================================================
+# BEGIN URW ============================================================
 
-#Foundry|Name|Searchpath
-foundry|U|(gs):@urwfontsdir@ :/usr/share/fonts/type1/gsfonts 
:/opt/local/share/fonts/urw-fonts # the URW fonts delivered with ghostscript 
(may be different)
-#Define Flags for afmtodit
+# URW fonts are typically shipped with Ghostscript, but can be replaced.
+
+#Foundry|Name|Search path
+foundry|U|(gs):@urwfontsdir@:/usr/share/fonts/type1/gsfonts:/opt/local/share/fonts/urw-fonts
+
+# Define flags for afmtodit.
 
 r=-i 0 -m
 i=-i 50
 n=-n
 s=-s
 
-#Font|IsBase14|Flags|Map|Encoding|File(!file...)
+#Font|IsBase14|Flags|Map|Encoding|File(!file)...
 
AB|N|r|textmap|text.enc|URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
 
ABI|N|i|textmap|text.enc|URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
 
AI|N|i|textmap|text.enc|URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
@@ -110,4 +118,4 @@ 
TR|N|r|textmap|text.enc|NimbusRoman-Regular.t1!NimbusRoman-Regular!NimbusRomNo9L
 
ZCMI|N|i|textmap|text.enc|Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb
 ZD|N|sr|dingbats.map||D050000L!D050000L.t1!Dingbats!d050000l.pfb
 
-#======================================================================
+# END URW ==============================================================
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index fbc656fc..363d4cdd 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -101,8 +101,13 @@ font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
 
 font/devpdf/Foundry: $(devpdf_srcdir)/Foundry.in
        $(AM_V_at)$(MKDIR_P) $(top_builddir)/font/devpdf/
+if HAVE_URW_FONTS
        $(AM_V_GEN)sed "s|[@]urwfontsdir[@]|$(urwfontsdir)|" \
-              $(devpdf_srcdir)/Foundry.in >$@
+         $(devpdf_srcdir)/Foundry.in >$@
+else
+       $(AM_V_GEN)sed "/BEGIN URW/,/END URW/d" \
+         $(devpdf_srcdir)/Foundry.in >$@
+endif
 
 font/devpdf/download: $(DEVPDFFONTMAP_1) $(DEVPDFFONTMAP_2) \
   font/devpdf/DESC font/devpdf/Foundry font/devpdf/enc/text.enc \



reply via email to

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