groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: Package `ghostscript' 9.21 renamed some fonts installed i


From: Bertrand Garrigues
Subject: [groff] 01/01: Package `ghostscript' 9.21 renamed some fonts installed in `/usr/share/ghostscript/9.21/Resource/Font', e.g. URWGothicL-Demi renamed to URWGothic-Demi, and droped the installation of URW fonts in `/usr/share/fonts/type1/gsfonts/', breaking font generation in `font/devpdf/util/BuildFoundries.pl'.
Date: Tue, 9 May 2017 17:15:13 -0400 (EDT)

bgarrigues pushed a commit to branch master
in repository groff.

commit 2b5a438e0c205a5f118b456db7438e35dab50e09
Author: Bertrand Garrigues <address@hidden>
Date:   Mon May 8 21:46:03 2017 +0200

    Package `ghostscript' 9.21 renamed some fonts installed in
    `/usr/share/ghostscript/9.21/Resource/Font', e.g. URWGothicL-Demi
    renamed to URWGothic-Demi, and droped the installation of URW
    fonts in `/usr/share/fonts/type1/gsfonts/', breaking font
    generation in `font/devpdf/util/BuildFoundries.pl'.
    
    * m4/groff.m4 (GROFF_URW_FONTS_PATH): New option
    `--with-urw-fonts-dir' to pass a custom path to URW fonts.
    (GROFF_URW_FONTS): search the presence of URW fonts by checking if
    file `a010013l.pfb' exists in the paths given by `gs -h', in the
    default paths used in `Foundry.in' and in the path given with
    option `--with-urw-fonts-dir'.
    (GROFF_URW_FONTS_CHECK): print a warning at the end of the
    configuration phase if no URW fonts were found.
    
    * configure.ac: call new macros `GROFF_URW_FONTS_PATH',
    `GROFF_URW_FONTS' and `GROFF_URW_FONTS_CHECK'.
    
    * font/devpdf/Foundry.in: add new basic fonts names and pass
    custom URW fonts path `urwfontsdir'.
    
    * font/devpdf/devpdf.am: subsitute `urwfontsdir' in `Foundry'
    generation.
    
    Fixes https://savannah.gnu.org/bugs/?50786
---
 ChangeLog              | 28 ++++++++++++++++++++
 configure.ac           | 10 ++++++++
 font/devpdf/Foundry.in | 70 +++++++++++++++++++++++++-------------------------
 font/devpdf/devpdf.am  |  2 +-
 m4/groff.m4            | 58 ++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 131 insertions(+), 37 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1341518..d9d78ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2017-05-09  Bertrand Garrigues <address@hidden>
+
+       Package `ghostscript' 9.21 renamed some fonts installed in
+       `/usr/share/ghostscript/9.21/Resource/Font', e.g. URWGothicL-Demi
+       renamed to URWGothic-Demi, and droped the installation of URW
+       fonts in `/usr/share/fonts/type1/gsfonts/', breaking font
+       generation in `font/devpdf/util/BuildFoundries.pl'.
+
+       * m4/groff.m4 (GROFF_URW_FONTS_PATH): New option
+       `--with-urw-fonts-dir' to pass a custom path to URW fonts.
+       (GROFF_URW_FONTS): search the presence of URW fonts by checking if
+       file `a010013l.pfb' exists in the paths given by `gs -h', in the
+       default paths used in `Foundry.in' and in the path given with
+       option `--with-urw-fonts-dir'.
+       (GROFF_URW_FONTS_CHECK): print a warning at the end of the
+       configuration phase if no URW fonts were found.
+
+       * configure.ac: call new macros `GROFF_URW_FONTS_PATH',
+       `GROFF_URW_FONTS' and `GROFF_URW_FONTS_CHECK'.
+
+       * font/devpdf/Foundry.in: add new basic fonts names and pass
+       custom URW fonts path `urwfontsdir'.
+
+       * font/devpdf/devpdf.am: subsitute `urwfontsdir' in `Foundry'
+       generation.
+
+       Fixes https://savannah.gnu.org/bugs/?50786
+
 2017-05-04  Deri James  <address@hidden>
 
        Fixes for gropdf
diff --git a/configure.ac b/configure.ac
index 981be01..0558515 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,9 @@ GROFF_TRADITIONAL_CPP
 # checks for operating system services
 GROFF_WCOREFLAG
 
+# URW fonts extra dir
+GROFF_URW_FONTS_PATH
+
 # other random stuff
 GROFF_BROKEN_SPOOLER_FLAGS
 GROFF_PAGE
@@ -178,6 +181,10 @@ GROFF_BASH
 gl_GLIBC21
 gl_LOCALCHARSET
 
+# checks for presence of URW fonts (requires ghostscript, which is
+# checked in GROFF_HTML_PROGRAMS
+GROFF_URW_FONTS
+
 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])
 
 # If X11 is not available, don't build:
@@ -230,6 +237,9 @@ echo "\
  Doc build         : ${doc} "
 fi
 echo "\
+ URW fonts for pdf : $groff_have_urw_fonts"
+echo "\
 ----------------------------------------------------------------------"
 
 GROFF_APPRESDIR_CHECK
+GROFF_URW_FONTS_CHECK
diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in
index a6e968f..092617e 100644
--- a/font/devpdf/Foundry.in
+++ b/font/devpdf/Foundry.in
@@ -25,47 +25,47 @@ foundry||(gs)
 # These are just copies of the grops fonts so MUST not have any flags etc set
 
 #Font|IsBase14|Flags|Map|Encoding|File(!file...)
-AB|N||||URWGothicL-Demi!a010015l.pfb
-ABI|N||||URWGothicL-DemiObli!a010035l.pfb
-AI|N||||URWGothicL-BookObli!a010033l.pfb
-AR|N||||URWGothicL-Book!a010013l.pfb
-BMB|N||||URWBookmanL-DemiBold!b018015l.pfb
-BMBI|N||||URWBookmanL-DemiBoldItal!b018035l.pfb
-BMI|N||||URWBookmanL-LighItal!b018032l.pfb
-BMR|N||||URWBookmanL-Ligh!b018012l.pfb
-CB|Y||||NimbusMonL-Bold!n022004l.pfb
-CBI|Y||||NimbusMonL-BoldObli!n022024l.pfb
-CI|Y||||NimbusMonL-ReguObli!n022023l.pfb
-CR|Y||||NimbusMonL-Regu!n022003l.pfb
+AB|N||||URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
+ABI|N||||URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
+AI|N||||URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
+AR|N||||URWGothic-Book!URWGothicL-Book!a010013l.pfb
+BMB|N||||URWBookman-Demi!URWBookmanL-DemiBold!b018015l.pfb
+BMBI|N||||URWBookman-DemiItalic!URWBookmanL-DemiBoldItal!b018035l.pfb
+BMI|N||||URWBookman-Light!URWBookmanL-LighItal!b018032l.pfb
+BMR|N||||URWBookman-LightItalic!URWBookmanL-Ligh!b018012l.pfb
+CB|Y||||NimbusMonoPS-Bold!NimbusMonL-Bold!n022004l.pfb
+CBI|Y||||NifmbusMonoPS-BoldItalic!NimbusMonL-BoldObli!n022024l.pfb
+CI|Y||||NimbusMonoPS-Italic!NimbusMonL-ReguObli!n022023l.pfb
+CR|Y||||NimbusMonoPS-Regular!NimbusMonL-Regu!n022003l.pfb
 EURO|N||||*../devps/freeeuro.pfa
-HB|Y||||NimbusSanL-Bold!n019004l.pfb
-HBI|Y||||NimbusSanL-BoldItal!n019024l.pfb
-HI|Y||||NimbusSanL-ReguItal!n019023l.pfb
-HNB|N||||NimbusSanL-BoldCond!n019044l.pfb
-HNBI|N||||NimbusSanL-BoldCondItal!n019064l.pfb
-HNI|N||||NimbusSanL-ReguCondItal!n019063l.pfb
-HNR|N||||NimbusSanL-ReguCond!n019043l.pfb
-HR|Y||||NimbusSanL-Regu!n019003l.pfb
-NB|N||||CenturySchL-Bold!c059016l.pfb
-NBI|N||||CenturySchL-BoldItal!c059036l.pfb
-NI|N||||CenturySchL-Ital!c059033l.pfb
-NR|N||||CenturySchL-Roma!c059013l.pfb
-PB|N||||URWPalladioL-Bold!p052004l.pfb
-PBI|N||||URWPalladioL-BoldItal!p052024l.pfb
-PI|N||||URWPalladioL-Ital!p052023l.pfb
-PR|N||||URWPalladioL-Roma!p052003l.pfb
-S|Y||||StandardSymL!s050000l.pfb
-TB|Y||||NimbusRomNo9L-Medi!n021004l.pfb
-TBI|Y||||NimbusRomNo9L-MediItal!n021024l.pfb
-TI|Y||||NimbusRomNo9L-ReguItal!n021023l.pfb
-TR|Y||||NimbusRomNo9L-Regu!n021003l.pfb
-ZCMI|N||||URWChanceryL-MediItal!z003034l.pfb
+HB|Y||||NimbusSans-Bold!NimbusSanL-Bold!n019004l.pfb
+HBI|Y||||NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
+HI|Y||||NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb
+HNB|N||||NimbusSansNarrow-Bold!NimbusSanL-BoldCond!n019044l.pfb
+HNBI|N||||NimbusSansNarrow-BdOblique!NimbusSanL-BoldCondItal!n019064l.pfb
+HNI|N||||NimbusSansNarrow-Oblique!NimbusSanL-ReguCondItal!n019063l.pfb
+HNR|N||||NimbusSansNarrow-Regular!NimbusSanL-ReguCond!n019043l.pfb
+HR|Y||||NimbusSans-Regular!NimbusSans-Regular!NimbusSanL-Regu!n019003l.pfb
+NB|N||||C059-Bold!CenturySchL-Bold!c059016l.pfb
+NBI|N||||C059-BdIta!CenturySchL-BoldItal!c059036l.pfb
+NI|N||||C059-Italic!CenturySchL-Ital!c059033l.pfb
+NR|N||||C059-Roman!CenturySchL-Roma!c059013l.pfb
+PB|N||||P052-Bold!URWPalladioL-Bold!p052004l.pfb
+PBI|N||||P052-BoldItalic!URWPalladioL-BoldItal!p052024l.pfb
+PI|N||||P052-Italic!URWPalladioL-Ital!p052023l.pfb
+PR|N||||P052-Roman!URWPalladioL-Roma!p052003l.pfb
+S|Y||||StandardSymbolsPS!StandardSymL!s050000l.pfb
+TB|Y||||NimbusRoman-Bold!NimbusRomNo9L-Medi!n021004l.pfb
+TBI|Y||||NimbusRoman-BoldItalic!NimbusRomNo9L-MediItal!n021024l.pfb
+TI|Y||||NimbusRoman-Italic!NimbusRomNo9L-ReguItal!n021023l.pfb
+TR|Y||||NimbusRoman-Regular!NimbusRomNo9L-Regu!n021003l.pfb
+ZCMI|N||||Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb
 ZD|Y||||Dingbats!d050000l.pfb
 
 #======================================================================
 
 #Foundry|Name|Searchpath
-foundry|U|(gs):/usr/share/fonts/type1/gsfonts 
:/opt/local/share/fonts/urw-fonts # the URW fonts delivered with ghostscript 
(may be different)
+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
 
 r=-i 0 -m
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 067da3f..907465c 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -106,7 +106,7 @@ font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
 
 font/devpdf/Foundry:
        @$(RM) $(top_builddir)/font/devpdf/Foundry
-       @cat $(devpdf_srcdir)/Foundry.in >$(top_builddir)/font/devpdf/Foundry
+       @sed "s|address@hidden@]|$(urwfontsdir)|" $(devpdf_srcdir)/Foundry.in 
>$(top_builddir)/font/devpdf/Foundry
 
 all: font/devpdf/build_font_files
 
diff --git a/m4/groff.m4 b/m4/groff.m4
index 75049e6..d1727cd 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1,5 +1,5 @@
 # Autoconf macros for groff.
-# Copyright (C) 1989-2014  Free Software Foundation, Inc.
+# Copyright (C) 1989-2016, 2017  Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -322,6 +322,62 @@ AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
    AC_SUBST([make_install_pdfexamples])
    AC_SUBST([make_uninstall_pdfexamples])])
 
+# Option to configure path to URW fonts
+AC_DEFUN([GROFF_URW_FONTS_PATH],
+   [AC_ARG_WITH([urw-fonts-dir],
+     [AS_HELP_STRING([--with-urw-fonts-dir=DIR],
+       [Search for URW fonts in this directory])],
+     [urwfontsdir="$withval"])
+   AC_SUBST(urwfontsdir)])
+
+# Check if URW fonts are available, either in the paths given by `gs
+# -h', in /usr/share/fonts/type1/gsfonts/ ,
+# /opt/local/share/fonts/urw-fonts (where font/devpdf/Foundry.in
+# expect them), or in the custom path passed to configure.
+AC_DEFUN([GROFF_URW_FONTS],
+  [AC_MSG_CHECKING([whether URW fonts in pfb format are available])
+  _list_paths=`gs -h | grep -A 16 "Search path" | grep "^[ ]" | tr : ' ' `
+  _list_paths="$_list_paths /usr/share/fonts/type1/gsfonts/ \
+               /opt/local/share/fonts/urw-fonts/"
+  if test -n "$urwfontsdir"; then
+    _list_paths="$ _list_paths $urwfontsdir"
+  fi
+  groff_have_urw_fonts=no
+  for k in $_list_paths; do
+    if test -f $k/a010013l.pfb; then
+      AC_MSG_RESULT([found in $k])
+      groff_have_urw_fonts=yes
+      break
+    fi
+  done 
+  if test $groff_have_urw_fonts = no; then
+    AC_MSG_RESULT([no])
+  fi
+  ])
+
+# Warning if URW fonts were not found
+AC_DEFUN([GROFF_URW_FONTS_CHECK],
+  [if test "$groff_have_urw_fonts" = no; then
+  AC_MSG_NOTICE([
+  No URW fonts in .pfb format were found on your system, URW fonts
+  generation for `devpdf' will not work properly.  These fonts can be
+  downloaded here:
+
+    http://downloads.ghostscript.com/public/fonts/urw-base35-v1.10.zip
+
+  By default groff will search these fonts in the paths given by `gs
+  -h' and in these 2 default directories:
+  `/usr/share/fonts/type1/gsfonts/' and
+  `/opt/local/share/fonts/urw-fonts/' (paths used by
+  font/devpdf/Foundry.in).  You can also pass the option
+  `--with-urw-fonts-dir=DIR' to 'configure' to set a custom path.  You
+  would need to re-run the 'configure' script after installing these
+  fonts.
+  
+  ])
+  fi
+  ])
+
 
 # Check whether pnmtops can handle the -nosetpage option.
 



reply via email to

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