bug-groff
[Top][All Lists]
Advanced

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

[bug #63808] configure gives incorrect information regarding pdf generat


From: G. Branden Robinson
Subject: [bug #63808] configure gives incorrect information regarding pdf generation
Date: Fri, 17 Feb 2023 02:54:34 -0500 (EST)

Follow-up Comment #13, bug #63808 (project groff):

[comment #12 comment #12:]
> I have had to re-open this bug since my testing has shown some problems.
First I will describe my testing method (in case there is something wrong with
it). I want to do 4 separate runs after doing a git pull, a make distclean and
rm -rf build (all runs will be out of tree builds with the distclean and the
rm between each run).
> 
> The four runs will be to test presence/absence of ghostscript and the URW
fonts.
> 
> Absense of ghostscript is achieved by renaming /usr/bin/gs to ogs.
> 
> Absence of URW font is achieved by renaming /usr/share/fonts/default/Type1
to oType1 (this is the location of my URW fonts, your location may differ but
the principle is the same).

Yes, this is practically identical to my test procedure.  I renamed things
differently, but in a manner that sufficed to defeat the 'configure' script's
ability to find them.

So I think your procedure was sound.
 
> The problem lies in the URW only run (no ghostscript). Configure detects no
ghostscript but reports that gropdf is in base 14 fonts modeonly

...this I expected, given my understanding of your report and the support
requirements.

> and then make produces no pdf documentation. The log shows there are 71
fonts available for devpdf!

This part I can't reproduce.  I _do_ get generated PDF documentation; the
collected groff man pages, automake.pdf, the mom docs, msboxes.pdf...

groff-man-pages.pdf is noteworthy because grops(1)'s typefaces list uses Times
roman in the listing of all text faces.  (When dependencies are fully
satisfied, they render using themselves.)

gropdf(1)'s typefaces list is complete, i.e., all 35 faces get demonstrated. 
I was expecting, and for one of the test scenarios I witnessed, degradation of
all text faces but the base 12 text fonts to Times roman.  So apparently I am
indeed confused here, and embedding is succeeding even in a scenario where I
didn't expect it to.  I was expecting the default foundry to be used, and that
to be inadequate because the Ghostscript fonts were not available (per the "gs
command test proxy").  But apparently gropdf will fail UPWARD to the U foundry
if the default one is inadequate.  I suppose BuildFoundries is working as you
intended.  Here is the Foundry file from that same build scenario as in my log
file.


$ cat $(find -name Foundry)
# Foundry file

# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#      Written by Deri James <deri@chuzzlewit.myzen.co.uk>
#
# This file is part of groff.
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# 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
# 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|Search path
foundry||/usr/share/fonts/type1/urw-base35/:(gs):/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript

# 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)...
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
AR|N||||URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb
BMB|N||||URWBookman-Demi.t1!URWBookman-Demi!URWBookmanL-DemiBold!b018015l.pfb
BMBI|N||||URWBookman-DemiItalic.t1!URWBookman-DemiItalic!URWBookmanL-DemiBoldItal!b018035l.pfb
BMI|N||||URWBookman-LightItalic.t1!URWBookman-LightItalic!URWBookmanL-LighItal!b018032l.pfb
BMR|N||||URWBookman-Light.t1!URWBookman-Light!URWBookmanL-Ligh!b018012l.pfb
CB|Y||||NimbusMonoPS-Bold.t1!NimbusMonoPS-Bold!NimbusMonL-Bold!n022004l.pfb
CBI|Y||||NimbusMonoPS-BoldItalic.t1!NimbusMonoPS-BoldItalic!NimbusMonL-BoldObli!n022024l.pfb
CI|Y||||NimbusMonoPS-Italic.t1!NimbusMonoPS-Italic!NimbusMonL-ReguObli!n022023l.pfb
CR|Y||||NimbusMonoPS-Regular.t1!NimbusMonoPS-Regular!NimbusMonL-Regu!n022003l.pfb
HB|Y||||NimbusSans-Bold.t1!NimbusSans-Bold!NimbusSanL-Bold!n019004l.pfb
HBI|Y||||NimbusSans-BoldItalic!NimbusSans-BoldOblique.t1!NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
HI|Y||||NimbusSans-Italic!NimbusSans-Oblique.t1!NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb
HNB|N||||NimbusSansNarrow-Bold.t1!NimbusSansNarrow-Bold!NimbusSanL-BoldCond!n019044l.pfb
HNBI|N||||NimbusSansNarrow-BoldOblique.t1!NimbusSansNarrow-BoldOblique!NimbusSansNarrow-BdOblique!NimbusSanL-BoldCondItal.t1!NimbusSanL-BoldCondItal!n019064l.pfb
HNI|N||||NimbusSansNarrow-Oblique.t1!NimbusSansNarrow-Oblique!NimbusSanL-ReguCondItal!n019063l.pfb
HNR|N||||NimbusSansNarrow-Regular.t1!NimbusSansNarrow-Regular!NimbusSanL-ReguCond!n019043l.pfb
HR|Y||||NimbusSans-Regular.t1!NimbusSans-Regular!NimbusSans-Regular!NimbusSanL-Regu!n019003l.pfb
NB|N||||C059-Bold.t1!C059-Bold!CenturySchL-Bold!c059016l.pfb
NBI|N||||C059-BdIta.t1!C059-BdIta!CenturySchL-BoldItal!c059036l.pfb
NI|N||||C059-Italic.t1!C059-Italic!CenturySchL-Ital!c059033l.pfb
NR|N||||C059-Roman.t1!C059-Roman!CenturySchL-Roma!c059013l.pfb
PB|N||||P052-Bold.t1!P052-Bold!URWPalladioL-Bold!p052004l.pfb
PBI|N||||P052-BoldItalic.t1!P052-BoldItalic!URWPalladioL-BoldItal!p052024l.pfb
PI|N||||P052-Italic.t1!P052-Italic!URWPalladioL-Ital!p052023l.pfb
PR|N||||P052-Roman.t1!P052-Roman!URWPalladioL-Roma!p052003l.pfb
S|Y||||StandardSymbolsPS.t1!StandardSymbolsPS!StandardSymL!s050000l.pfb
TB|Y||||NimbusRoman-Bold.t1!NimbusRoman-Bold!NimbusRomNo9L-Medi!n021004l.pfb
TBI|Y||||NimbusRoman-BoldItalic.t1!NimbusRoman-BoldItalic!NimbusRomNo9L-MediItal!n021024l.pfb
TI|Y||||NimbusRoman-Italic.t1!NimbusRoman-Italic!NimbusRomNo9L-ReguItal!n021023l.pfb
TR|Y||||NimbusRoman-Regular.t1!NimbusRoman-Regular!NimbusRomNo9L-Regu!n021003l.pfb
ZCMI|N||||Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb
ZD|Y||||D050000L!D050000L.t1!Dingbats!d050000l.pfb
EURO|N||||*../devps/freeeuro.pfa

# BEGIN URW ============================================================

# URW fonts are typically shipped with Ghostscript, but can be replaced.

#Foundry|Name|Search path
foundry|U|/usr/share/fonts/type1/urw-base35/:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript:(gs)

# Define flags for afmtodit.

r=-i 0 -m
i=-i 50
n=-n
s=-s

#Font|IsBase14|Flags|Map|Encoding|File(!file)...
AB|N|r|text.map|text.enc|URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
ABI|N|i|text.map|text.enc|URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
AI|N|i|text.map|text.enc|URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
AR|N|r|text.map|text.enc|URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb
BMB|N|r|text.map|text.enc|URWBookman-Demi.t1!URWBookman-Demi!URWBookmanL-DemiBold!b018015l.pfb
BMBI|N|i|text.map|text.enc|URWBookman-DemiItalic.t1!URWBookman-DemiItalic!URWBookmanL-DemiBoldItal!b018035l.pfb
BMI|N|i|text.map|text.enc|URWBookman-Light.t1!URWBookman-Light!URWBookmanL-LighItal!b018032l.pfb
BMR|N|r|text.map|text.enc|URWBookman-LightItalic.t1!URWBookman-LightItalic!URWBookmanL-Ligh!b018012l.pfb
CB|N|nr|text.map|text.enc|NimbusMonoPS-Bold.t1!NimbusMonoPS-Bold!NimbusMonL-Bold!n022004l.pfb
CBI|N|ni|text.map|text.enc|NimbusMonoPS-BoldItalic.t1!NimbusMonoPS-BoldItalic!NimbusMonL-BoldObli!n022024l.pfb
CI|N|ni|text.map|text.enc|NimbusMonoPS-Italic.t1!NimbusMonoPS-Italic!NimbusMonL-ReguObli!n022023l.pfb
CR|N|nr|text.map|text.enc|NimbusMonoPS-Regular.t1!NimbusMonoPS-Regular!NimbusMonL-Regu!n022003l.pfb
HB|N|r|text.map|text.enc|NimbusSans-Bold.t1!NimbusSans-Bold!NimbusSanL-Bold!n019004l.pfb
HBI|N|i|text.map|text.enc|NimbusSans-BoldItalic!NimbusSans-BoldItalic.t1!NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
HI|N|i|text.map|text.enc|NimbusSans-Italic!NimbusSans-Italic.t1!NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb
HNB|N|r|text.map|text.enc|NimbusSansNarrow-Bold.t1!NimbusSansNarrow-Bold!NimbusSanL-BoldCond!n019044l.pfb
HNBI|N|i|text.map|text.enc|NimbusSansNarrow-BoldOblique.t1!NimbusSansNarrow-BoldOblique!NimbusSansNarrow-BdOblique!NimbusSanL-BoldCondItal.t1!NimbusSanL-BoldCondItal!n019064l.pfb
HNI|N|i|text.map|text.enc|NimbusSansNarrow-Oblique.t1!NimbusSansNarrow-Oblique!NimbusSanL-ReguCondItal!n019063l.pfb
HNR|N|r|text.map|text.enc|NimbusSansNarrow-Regular.t1!NimbusSansNarrow-Regular!NimbusSanL-ReguCond!n019043l.pfb
HR|N|r|text.map|text.enc|NimbusSans-Regular.t1!NimbusSans-Regular!NimbusSans-Regular!NimbusSanL-Regu!n019003l.pfb
NB|N|r|text.map|text.enc|C059-Bold.t1!C059-Bold!CenturySchL-Bold!c059016l.pfb
NBI|N|i|text.map|text.enc|C059-BdIta.t1!C059-BdIta!CenturySchL-BoldItal!c059036l.pfb
NI|N|i|text.map|text.enc|C059-Italic.t1!C059-Italic!CenturySchL-Ital!c059033l.pfb
NR|N|r|text.map|text.enc|C059-Roman.t1!C059-Roman!CenturySchL-Roma!c059013l.pfb
PB|N|r|text.map|text.enc|P052-Bold.t1!P052-Bold!URWPalladioL-Bold!p052004l.pfb
PBI|N|i|text.map|text.enc|P052-BoldItalic.t1!P052-BoldItalic!URWPalladioL-BoldItal!p052024l.pfb
PI|N|i|text.map|text.enc|P052-Italic.t1!P052-Italic!URWPalladioL-Ital!p052023l.pfb
PR|N|r|text.map|text.enc|P052-Roman.t1!P052-Roman!URWPalladioL-Roma!p052003l.pfb
S|N|sr|symbol.map||StandardSymbolsPS.t1!StandardSymbolsPS!StandardSymL!s050000l.pfb
TB|N|r|text.map|text.enc|NimbusRoman-Bold.t1!NimbusRoman-Bold!NimbusRomNo9L-Medi!n021004l.pfb
TBI|N|i|text.map|text.enc|NimbusRoman-BoldItalic.t1!NimbusRoman-BoldItalic!NimbusRomNo9L-MediItal!n021024l.pfb
TI|N|i|text.map|text.enc|NimbusRoman-Italic.t1!NimbusRoman-Italic!NimbusRomNo9L-ReguItal!n021023l.pfb
TR|N|r|text.map|text.enc|NimbusRoman-Regular.t1!NimbusRoman-Regular!NimbusRomNo9L-Regu!n021003l.pfb
ZCMI|N|i|text.map|text.enc|Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb
ZD|N|sr|dingbats.map||D050000L!D050000L.t1!Dingbats!d050000l.pfb

# END URW ==============================================================


> You used to have a test basic-fonts-present.sh which tested for 35 fonts
plus EURO but you have now changed it to 14 fonts plus EURO. You said because
you got failures when testing with a ghostscript only run. This is a real
failure, so it is better to investigate why fonts are missing than change the
test to pass when something is wrong! Please can you provide the output of gs
-h and an ls of whichever directory actually holds the postscript fonts.
(Ghostscript may have changed the font names once again!). As you can see in
my log of a ghostscript only run all 35 fonts are present in devpdf, as they
should be, if they are not it is a real error.

I am starting to get confused again, but before we try to resolve this, please
look at my attached output log (of a without gs, with URW fonts build) and see
if you find any surprises in it.

> I think you mentioned using chroot for your tests, please make sure the
paths given by gs -h are available at wherever you have chrooted to.

You are puzzling me here.  If gs is not installed (or moved out of the way), I
don't expect the "gs -h" command to work at all.

> You say:
> 
>     * font/devpdf/devpdf.am: Test availability of "basic" (PDF base
>       14) fonts (plus groff's "EURO") if either Ghostscript or URW fonts
are
>       available.  Test availability of URW fonts (35) only if Ghostscript
>       _and_ the URW fonts were found at configuration time.
> 
> The correct logic is this:-
> 
> if gs or urw
>     run basic check
>     if urw
>         run urw check
>     end
> end
> 
> I don't see why the urw check is only run if both gs and urw are present!
The U- foundry has no no dependency on ghostscript at all. If you really want
belt and braces you could rename the current basic-fonts-present.sh to
base14-fonts-present.sh,

That is what I understand "basic-fonts-present" to mean.  Certainly the test
could be renamed.  Maybe you are understanding "basic-fonts-present" to mean
_all_ those listed in the devps directory?

If that is the case then I am not certain we need a base14 check at all, given
that grops ships with PS Level 2 base 35 font descriptions and URW always
provides at least this many.  Maybe that is the root of our misunderstanding.

I suppose someone could go through and manually change their system to remove
some of the URW fonts at random, but I'm not sure that's a scenario worth
detecting in our configure script.  gropdf's own diagnostics should suffice if
they they attempt to use the fonts they cast aside.

> and resurect the previous incarnation, and extend the logic to:-
> 
> if gs or urw
>     run basic check
>     if urw
>         run urw check
>     end
> else
>     run base14 check
> end
> 

This I don't understand.  What is the purpose of the "basic" check if it isn't
to ensure that gropdf has font descriptions for the base 14 fonts (+EURO) that
it can use to construct rudimentary PDF documents?  (Embedding only EURO, if
necessary.)

Are you thinking of "basic" as a check for, so to speak, Adobe foundry fonts? 
(Or the unnamed "default" foundry, equivalently?)

I was not thinking of it that way.

You will see that the post-rc2 commit count is now 75.  Here are the changes
since my last push.  I don't think any of them should have any impact on this
ticket, but I will be pushing again in the next day, most likely.


commit 3f1d9644283f06b5e6d3e996cfaf2dee38cda133 (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 17 01:13:38 2023 -0600

    [ms]: Port a test to Solaris 11 sed.
    
    * tmac/tests/s_TC-works-with-percent-in-custom-titles.sh: Put newlines
      after opening braces in sed scripts.  macOS and GNU sed tolerate their
      absence, but this sed does not.
    
    * HACKING: Document this problem.

commit 96e200dc5b0aec9a7b594caa6bd5877ed718bd61
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 12:14:58 2023 -0600

    [tests]: Don't test grohtml if unsupported.
    
    * src/roff/groff/groff.am (groff_TESTS) [!USE_GROHTML]: Don't test the
      'grohtml' driver if we know it won't work.

commit 046dc24210336976552ec401c60f39e3b192f671
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 11:49:51 2023 -0600

    [tests]: Fix test failure on Solaris 11.
    
    * src/roff/groff/tests/device_control_escapes_express_basic_latin.sh:
      Use printf(1), which is often a shell built-in command, more
      consistently.  Double backslashes intended as literals in the format
      string, and single-quote format strings using them.  Fixes test
      failure seen on Solaris 11 with GNU Bash 4.4 and ksh 93u+
      (2012-08-01).

commit 1f02825b60124fd9f048f6857902dff154da5300
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 11:44:49 2023 -0600

    [tests]: Send progress to standard error stream.
    
    * src/roff/groff/tests/device_control_escapes_express_basic_latin.sh:
      Send progress updates to standard error stream.

commit 3e8eda648d6f45cea261638ae59818cacf0d2fdd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 11:24:18 2023 -0600

    groff(7): Fix typo.

commit 45177c87b78b21950b4f15f6fe725af3a486986d (origin/master, origin/HEAD)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 00:03:13 2023 -0600

    ChangeLog: Fix missing words.


I suspect some bystanders and/or groff critics will take dark amusement from
our struggles to communicate with each other on this subject.  Nevertheless I
think if we work through it, groff's PDF support will be the better for it. 
That will set a more solid foundation for expanded font support in 1.24,
giving the naysayers one fewer thing to grouse about.

(file #54367)

    _______________________________________________________

Additional Item Attachment:

File name: 63808-gbr-without-gs-with-urw.log Size:59 KB
   
<https://file.savannah.gnu.org/file/63808-gbr-without-gs-with-urw.log?file_id=54367>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63808>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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