bugGNU roff - Bugs: bug #67207, [devpdf] work better with embedded...

 
 

bug #67207: [devpdf] work better with embedded non-standard fonts in separate build trees

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Tue 10 Jun 2025 10:36:04 AM UTC
   
 
Category:  Font devpdf Severity:  3 - Normal
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  deri
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Jump to the original submission

Sat 20 Sep 2025 12:15:44 AM UTC, comment #44: 


commit 6198245eac8f51a17b222118b02102a9c2ea4519
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Thu Jul 24 17:57:44 2025 +0100

    Improve build logic.

    * font/devpdf/util/BuildFoundries.pl: If any warnings issued
    during run, exit code 2 at end of run. This will abort any
    build. Change to Notice any information only messages.
    Remove code which copied grops fonts to gropdf (Branden added
    this to devpdf.am so is now unnecessary).

    * src/devices/gropdf/gropdf.pl: Exit with code 2 if any
    warnings issued during run (this will stop a 'make'). Report
    a 'Notice' if duplicate font entries and 1 is incorrect.
    Report path of download file in messages.

    * src/devices/gropdf.1.man: Document exit status.

    * contrib/mom/mom.am:
    * doc/doc.am: -W flag no longer required

    Continues fixing Savannah #67268.


G. Branden Robinson <gbranden>
Group administrator
Thu 24 Jul 2025 06:11:59 PM UTC, comment #43: 

Deri commented in bug #67268:

> I have just pushed fixes for this and bug #67207.


Kicking back to "Fixed" status.

G. Branden Robinson <gbranden>
Group administrator
Fri 04 Jul 2025 04:27:58 PM UTC, comment #42: 

At 2025-07-04T11:47:43-0400, Deri James wrote:

> > In trying to address it, I blundered into a bunch of familiar land
> > mines.  A lot goes wrong because BuildFoundries.pl and gropdf.pl
> > often neglect to check for ill-formed input files or errors when
> > writing files, and even when problems are detected, these programs
> > typically just throw warnings and keep going.
> >
> > That's not what we want when building groff itself.
> >
> > See bug #67268, which I'll be updating shortly.
>
> That's a little misleading.


I disagree.

> Dave's bug was not about about a perl script not validating its input,
> rather it revealed flaws in the makefile.


The Perl scripts and the (Automake-generated) Makefile have to
cooperate.  I finally discovered why the `chmod` trick you
inserted to force a "make distcheck" to ride past a file permission
failure was necessary; I've now made it unnecessary.

> You may have discovered such validation issues while stumbling about
> your minefield.


If I have to add error-checking to a Perl script to overcome a problem,
then it was the Perl script that was missing validation.  End users
could surprise those scripts just as our Makefile did.

> I say "yours" given that you are the main contributor to devpdf.am:-
>
> Ingo Schwarze           2
> Bernd Warken            4
> Deri James              9
> Werner Lemberg          17
> Bertrand Garrigues      34
> G. Branden Robinson     208
> Total   274
>
> It is unfortunate you didn't consider sharing a map of the mines you
> blundered into


You have it now!  Each mine is carefully annotated.

> rather than having a good old whinge about my work here!


I solicited your feedback multiple times.  Once, you replied, then you
didn't.

https://lists.gnu ... -06/msg00049.html
https://lists.gnu ... -06/msg00065.html

I don't much care if I sound whingy if I get a better groff out of it.

G. Branden Robinson <gbranden>
Group administrator
Fri 04 Jul 2025 03:47:40 PM UTC, comment #41: 

On Friday, 4 July 2025 16:04:36 BST you wrote:

> Follow-up Comment #40, bug #67207 (group groff):
>
> comment #39:
>
> > I didn't get any actionable feedback on my changes to BuildFoundries or
> > gropdf, so I'm abandoning them for now.
>
> That didn't work out well.  Or it did, depending on your point of view.
>
> > Issues with them can be addressed in future tickets.
>
> Dave discovered at least one in bug #67268.
>
> In trying to address it, I blundered into a bunch of familiar land mines.  A
> lot goes wrong because BuildFoundries.pl and gropdf.pl often neglect to
> check for ill-formed input files or errors when writing files, and even
> when problems are detected, these programs typically just throw warnings
> and keep going.
>
> That's not what we want when building groff itself.
>
> See bug #67268, which I'll be updating shortly.


That's a little misleading. Dave's bug was not about about a perl script not
validating its input, rather it revealed flaws in the makefile. You may have
discovered such validation  issues while stumbling about your minefield. I say
"yours" given that you are the main contributor to devpdf.am:-

Ingo Schwarze           2
Bernd Warken            4
Deri James              9
Werner Lemberg          17
Bertrand Garrigues      34
G. Branden Robinson     208
Total   274

It is unfortunate you didn't consider sharing a map of the mines you blundered
into rather than having a good old whinge about my work here!

Deri James <deri>
Group Member
Fri 04 Jul 2025 03:04:31 PM UTC, comment #40: 

comment #39:

> I didn't get any actionable feedback on my changes to BuildFoundries or gropdf, so I'm abandoning them for now.


That didn't work out well.  Or it did, depending on your point of view.

> Issues with them can be addressed in future tickets.


Dave discovered at least one in bug #67268.

In trying to address it, I blundered into a bunch of familiar land mines.  A lot goes wrong because BuildFoundries.pl and gropdf.pl often neglect to check for ill-formed input files or errors when writing files, and even when problems are detected, these programs typically just throw warnings and keep going.

That's not what we want when building groff itself.

See bug #67268, which I'll be updating shortly.

G. Branden Robinson <gbranden>
Group administrator
Sun 29 Jun 2025 09:35:21 AM UTC, comment #39: 

I didn't get any actionable feedback on my changes to BuildFoundries or gropdf, so I'm abandoning them for now.  Issues with them can be addressed in future tickets.

G. Branden Robinson <gbranden>
Group administrator
Sun 29 Jun 2025 09:34:18 AM UTC, comment #38: 


commit 6904ddfdd7ab4812f5baddb90f3fb25429f36e3f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 26 01:11:10 2025 -0500

    [devpdf]: Fix Savannah #67207 (1/4).

    * font/devpdf/DESC.in: Mount `SS`, `S`, and `ZD` fonts in same positions
      as "ps" device.  This should have little effect other than to minimize
      differences between the devices, however the "ps" device continues to
      have a font, `ZDR`, mounted after all of the foregoing, that the "pdf"
      device lacks and does not require.

    Begins fixing <https://savannah.gnu.org/bugs/?67207>.

commit cc530f68d81f47ecb3479b4b7c8ebc6e3019f410
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 26 01:14:22 2025 -0500

    [devpdf]: Fix Savannah #67207 (2/4).

    * font/devpdf/SS: Annotate file's hand-maintained status.

    Continues fixing <https://savannah.gnu.org/bugs/?67207>.

commit bace292cafa6018d14f79c53baf3213e5a24a078
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Jun 29 03:07:52 2025 -0500

    [devpdf]: Fix Savannah #67207 (3/4).

    * font/devpdf/devpdf.am: Refactor.  Make this script more
      Automake-idiomatic (I think) and resemble other groff Automake scripts
      more closely.

      (devpdf_builddir): Define macro.

      (GROFF_FONT_FILES, ENC_FILES, MAP_FILES): Drop macros populated by
      shell command substitution in favor of static file lists...
      (DEVPDFFONTFILES_FROM_DEVPS): ...like this...
      (DEVPDFFONTFILES_FOR_URW) [HAVE_URW_FONTS]: ...and this.

      (DEVPDFFONTFILES): New macro contains only
      `DEVPDFFONTFILES_FROM_DEVPS` plus the "download", "DESC", "SS", and
      "StandardSymSL.pfb" files (all generated by the build, the last two
      trivially).

      (devpdffontdata, devpdffontencdata): Rationalize contents, aligning
      files and macro contents with installation requirements so Automake
      takes care of installing and uninstalling them.

      (MOSTLYCLEANFILES): Add `devpdffontdata`, `devpdffontencdir`,
      `devpdffontmapdir`, so that Automake takes care of cleaning them.

      ($(DEVPDFFONTFILES_FROM_DEVPS)): New target copies "ps" device's font
      descriptions to build's "pdf" device data directory.

      ($(devpdffontencdata)): Now that the "text.enc" encoding file name is
      stored in a macro, use it and compute its basename instead of using
      literals.

      ($(DEVPDFFONTFILES_FOR_URW)): Make the "pdf" device's "download" file
      depend on this macro's contents, which may be empty if
      `HAVE_URW_FONTS` is not defined by the "configure" script.

      (font/devpdf/stamp): Respell dependencies using above macros.

      (mostlyclean-local, mostlyclean_devpdf_extra) (install-data-local,
      install_devpdf) (uninstall_groffdirs, uninstall_devpdf): Drop targets
      made redundant by better population of `devpdf*data` macros above.

    Continues fixing <https://savannah.gnu.org/bugs/?67207>.

commit 9bd5fb50269aab1f5057eb9066e6a6dda79da635
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Jun 29 03:50:16 2025 -0500

    [gropdf]: Fix Savannah #67207 (4/4).

    * tmac/pdf.tmac (pdf:SS): Delete now-unused macro.

    Fixes <https://savannah.gnu.org/bugs/?67207>.


G. Branden Robinson <gbranden>
Group administrator
Thu 26 Jun 2025 06:26:05 AM UTC, comment #37: 

comment #34:

> > By contrast, we can still use pfbtops to generate a PFA from
> > "StandardSymSL.pfb", but we don't have to name the PFA in the "download"
> > file. Not doing so makes the exercise a bit of a digression from
> > "devpdf.am"'s mission, but I like the idea of shipping the font in both
> > formats, and I strongly like the idea of actually exercising pfbtops's
> > code.
>
> Why do you like the idea?


I decided to do this instead.


commit f9a017fc434a4025e9186a600ce7fde729539337
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 26 01:23:43 2025 -0500

    [pfbtops]: Add test for `pfbtops` command.

    * src/util/pfbtops/tests/smoke-test.sh: Do it.
    * src/util/pfbtops//pfbtops.am (pfbtops_TESTS): Run test.
      (TESTS): Add test to suite.
      (EXTRA_DIST): Ship test in distribution archive.


However I'm also doing this:


commit 545633c2da201a9b25e12f62b869f124c9fa0dd3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 26 01:05:21 2025 -0500

    [devpdf]: Ship source for StandardSymSL font.

    * font/devpdf/generate/StandardSymSL.sfd: Add human-readable source
      format for new font.  Everything in groff is available under the GNU
      GPL, so we should provide a "preferred form for modification".  (We
      already do so for "freeeuro.sfd".)

    * font/devpdf/devpdf.am (EXTRA_DIST): ...and ship it in the distribution
      archive.  At this time, we also ship the "compiled" PFB file; the
      build process does not perform any transformation of the source SFD
      file.  That can change in the future if we can tolerate a build-time
      dependency on fontforge(1).


G. Branden Robinson <gbranden>
Group administrator
Thu 26 Jun 2025 05:53:08 AM UTC, comment #36: 

Another reason to make "devpdf.am" more make-idiomatic is so that when, say, the devps font description or mapping files get updated, as is happening for bug #67244, make recognizes them as out-of-date for devpdf, and updates the copies.

Otherwise, you have to either correctly anticipate what went wrong, or blindly clean the whole build tree and hope the problem fixes itself.

G. Branden Robinson <gbranden>
Group administrator
Tue 24 Jun 2025 09:32:43 PM UTC, comment #35: 

At 2025-06-24T10:34:32-0400, Deri James wrote:

> Follow-up Comment #34, bug #67207 (group groff):
> > We use the "mv $@.tmp $@" technique in other places without
> > provoking this issue, at any rate, so the foregoing is my guess.
>
> Almost there. mv $@.tmp $@ works great if $@ does not already exist
> with read- only permissions, similarly copying download.in works great
> if the mv has not already happened.


Acknowledged.

> With 16 cores make -j would sometimes work (when the cp and
> the mv finished before the chmod -R a=r hit).


That's surprising to me.  I don't think GNU make(1)--or any
make(1)--tries to execute the individual lines of target rule scripts
concurrently (only the targets-as-prerequisites--each one gets a "token"
as POSIX Issue 8 puts it[1]), and moreover we usually serialize
operations with the shell's `&&` operator in such rules.

I could be wrong...  And if you get failures sometimes with "-j 16" and
sometimes not, odds are high that something is racing!  Please file a
new ticket against "Build/Installation" if you narrow it down any.

> > By contrast, we can still use pfbtops to generate a PFA from
> > "StandardSymSL.pfb", but we don't have to name the PFA in the
> > "download" file. Not doing so makes the exercise a bit of a
> > digression from "devpdf.am"'s mission, but I like the idea of
> > shipping the font in both formats, and I strongly like the idea of
> > actually exercising pfbtops's code.
>
> Why do you like the idea?


Bugs lurk in untested code.

> Second time was better, made it to the list, but mangled the pdf
> attachment, this, the third attempt, got to be the charm. :-)


I think it was!  :D

[1] https://pubs.open ... ilities/make.html

G. Branden Robinson <gbranden>
Group administrator
Tue 24 Jun 2025 02:34:28 PM UTC, comment #34: 

On Tuesday, 24 June 2025 01:15:06 BST G. Branden Robinson wrote:

> Follow-up Comment #33, bug #67207 (group groff):
>
> Resuming the conversation about build infrastructure stuff.
>
> Deri responded to me in an email:
> >> (font/devpdf/download): Set write permission on the target to work
> >> around GNU Automake "distcheck" feature that makes make(1)-generated
> >> files read-only; however we want "BuildFoundries" to rewrite the file
> >> in place.
> >
> > A while ago you changed it from writing download directly to > > writing
> > to
> > download.tmp which
> > is then "mv"ed.
>
> I think what's happening--but I haven't verified this or dug into Automake
> internals to try to grasp what's going on--is that because
> "BuildFoundries.pl" rewrites the "download" file by "clobbering" it, that
> triggers the overwrite warning due to the permissions Automake sets to test
> the distribution archive.
>
> We use the "mv $@.tmp $@" technique in other places without provoking this
> issue, at any rate, so the foregoing is my guess.


Almost there. mv $@.tmp $@ works great if $@ does not already exist with read-
only permissions, similarly copying download.in works great if the mv has not
already happened. With 16 cores make -j would sometimes work (when the cp and
the mv finished before the chmod -R a=r hit).

> > Yes it could be a separate target, but I would prefer a pfb file (more
> > compact, gropdf is slow enough already). So maybe StandardSymSL.pfb.in
> > generates (cp -u) StandardSymSL.pfb.
> > SS does not actually need a separate rule, a change to foundry.in could
> > take care of it, but if you intend to retire BuildFoundries transferring
> > all the logic to devpdf.am it is probably not worth it.
>
> Okay.  Adding the low-hanging fruit as a plan for this ticket.
>
> I don't have any short-term aim to retire "BuildFoundries.pl", but for
> build-related jiggery-pokery I'd like to do as much in make(1) targets as
> possible.
>
> By contrast, we can still use pfbtops to generate a PFA from
> "StandardSymSL.pfb", but we don't have to name the PFA in the "download"
> file. Not doing so makes the exercise a bit of a digression from
> "devpdf.am"'s mission, but I like the idea of shipping the font in both
> formats, and I strongly like the idea of actually exercising pfbtops's
> code.


Why do you like the idea?

> > My first time attempt at using the bug-list email interface, so it
> > probably
> > won't work.
>
> It did not work out well.  You need to be sure to GPG-sign the reply with
> the key in your Savannah profile, and anything you put below the "savane"
> line that the reply interface says *has* to be there, it will discard
> from your message.
>
> I learned these things the hard way.


Second time was better, made it to the list, but mangled the pdf attachment,
this, the third attempt, got to be the charm. :-)

Deri James <deri>
Group Member
Tue 24 Jun 2025 12:15:01 AM UTC, comment #33: 

Resuming the conversation about build infrastructure stuff.

Deri responded to me in an email:


>>       (font/devpdf/download): Set write permission on the target to work
>>       around GNU Automake "distcheck" feature that makes make(1)-generated
>>       files read-only; however we want "BuildFoundries" to rewrite the file
>>       in place.
>
> A while ago you changed it from writing download directly to > > writing to download.tmp which
> is then "mv"ed.


I think what's happening--but I haven't verified this or dug into Automake internals to try to grasp what's going on--is that because "BuildFoundries.pl" rewrites the "download" file by "clobbering" it, that triggers the overwrite warning due to the permissions Automake sets to test the distribution archive.

We use the "mv $@.tmp $@" technique in other places without provoking this issue, at any rate, so the foregoing is my guess.


>> Since the PDF device doesn't need the "ZDR" font at all, I suggest making
>> the font mounting positions "line up" between the two output devices.  So
>> like this.
>>
>>
>> -fonts 9 0 0 0 0 0 0 SS S ZD
>> +fonts 8 0 0 0 0 0 SS S ZD
>Yes, why not. I was trying to get ps and pdf to allocate similar mount positions, i.e.:-
>echo \\f[AB]Deri | test-groff -T[ps|pdf] -Z
>both produce:-
>x font 14 AB
>but never worked. Although:-
>fonts 9 0 0 0 0 0 SS S ZD S
>does. But that is so naughty and cheating, we should never do that! (something to keep in my back pocket when comparing grout between ps/pdf, useful for testing changes to pdf.tmac not introducing text positional changes.


Okay.  Adding this change as a plan for this ticket.


>> I'd like to add an annotation to this comment header indicating that the
>> file is manually maintained, and to explain why.  I'd probably copy the
>> same wording I used in the ChangeLog entry, but if you'd like to propose
>> some language, I'd be eager to see it.
>>
>Good idea. I may add a flag to afmtodit "--scale 0.89" so we can generate a pucker SS. Wording is pucker.


Okay.  Adding this change as a plan for this ticket.


>> I'd like to get rid of the side effect of this target, and add a real one
>> for "StandardSymSL.pfa", which we'd generate in the build tree from
>> "StandardSymSL.pfb" using our own _pfbtops_(1) program.  I piloted this in
>> bug #67207 and it passed a smoke test, at least.
>Yes it could be a separate target, but I would prefer a pfb file (more compact, gropdf is slow enough already). So maybe StandardSymSL.pfb.in generates (cp -u) StandardSymSL.pfb.
>SS does not actually need a separate rule, a change to foundry.in could take care of it, but if you intend to retire BuildFoundries transferring all the logic to devpdf.am it is probably not worth it.


Okay.  Adding the low-hanging fruit as a plan for this ticket.

I don't have any short-term aim to retire "BuildFoundries.pl", but for build-related jiggery-pokery I'd like to do as much in make(1) targets as possible.

By contrast, we can still use pfbtops to generate a PFA from "StandardSymSL.pfb", but we don't have to name the PFA in the "download" file.  Not doing so makes the exercise a bit of a digression from "devpdf.am"'s mission, but I like the idea of shipping the font in both formats, and I strongly like the idea of actually exercising pfbtops's code.


>> As previewed in bug #67207, I'd prefer to migrate to a statically populated
>> macro listing "ps" device fonts we expect to support.  As PostScript is now
>> a withdrawn and abandoned standard, I don't think we need to pursue maximum
>> flexibility here.
>>
>Much better, & font S can go back to where it belongs.


Okay.  Adding this change as a plan for this ticket.


>> diff --git a/tmac/pdf.tmac b/tmac/pdf.tmac
>> index 98fa3ef0e..9571e0148 100644
>> --- a/tmac/pdf.tmac
>> +++ b/tmac/pdf.tmac
>> @@ -38,34 +38,6 @@
>>  .de pdf:SS
>>  .      fchar \\$1 \\S'16'\\$1\\S'0'
>>  ..
>>
>>
>> As previewed in bug #67207, I'd like to kill off this (undocumented) macro
>> definition too, since we no longer use it, and it is easy for a document
>> author to recreate if they desire it.
>Yes, an oversight by me.


Okay.  Adding this change as a plan for this ticket.


>My first time attempt at using the bug-list email interface, so it probably won't work.


It did not work out well.  You need to be sure to GPG-sign the reply with the key in your Savannah profile, and anything you put below the "savane" line that the reply interface says *has* to be there, it will discard from your message.

I learned these things the hard way.

G. Branden Robinson <gbranden>
Group administrator
Fri 20 Jun 2025 03:23:53 PM UTC, comment #32: 

I'll follow up in bug #65098 since that ticket no longer depends on this one.

G. Branden Robinson <gbranden>
Group administrator
Fri 20 Jun 2025 10:29:22 AM UTC, comment #31: 

A final tweak to avoid the distcheck pause (for 'y' entry).
Please just apply SSv3.patch to master and confirm there are no build problems, font SS is embedded in groff-man-pages.pdf and I am good to go for commit.

(file #57308)

Deri James <deri>
Group Member
Thu 19 Jun 2025 10:21:52 PM UTC, comment #30: 


> While merging my revamp of "devpdf.am" with your "SS" support patch, I ran again into some of the problems I originally hit, when doing a "make distcheck".


Why would you do that? I thought you would be testing SSv2.patch against master, because the only problem I have found in distcheck is that the download file is moved to font/devpdf twice, once when it is copied from download.in and then again after BuildFoundries.pl has populated a temporary file with new entries and it is moved again. Since, for some reason (you ignored my question why?) all files installed by distcheck are read only, so when the file is copied the second time, on my system, it pauses for confirmation. I did try to explain this before. After you have tested SSv2.patch applied to master and confirmed everything works as expected, I'm sure you will want to "improve" devpdf.am, but you will find it easier starting from a make file which is actually working.

I look forward to hearing if my patch alone on master works for you, as it does for me.

Deri James <deri>
Group Member
Thu 19 Jun 2025 09:09:55 PM UTC, comment #29: 

Ah, there was an even earlier problem with "make distcheck":


  GEN      afmtodit
  GEN      font/devpdf/util/BuildFoundries
  GEN      font/devpdf/download
BuildFoundries: warning: line 33: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/AB' for Foundry ''
BuildFoundries: notice: copied grops font AB
BuildFoundries: warning: line 34: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/ABI' for Foundry ''
BuildFoundries: notice: copied grops font ABI
BuildFoundries: warning: line 35: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/AI' for Foundry ''
BuildFoundries: notice: copied grops font AI
BuildFoundries: warning: line 36: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/AR' for Foundry ''
BuildFoundries: notice: copied grops font AR
BuildFoundries: warning: line 37: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/BMB' for Foundry ''
BuildFoundries: notice: copied grops font BMB
BuildFoundries: warning: line 38: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/BMBI' for Foundry ''
BuildFoundries: notice: copied grops font BMBI
BuildFoundries: warning: line 39: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/BMI' for Foundry ''
BuildFoundries: notice: copied grops font BMI
BuildFoundries: warning: line 40: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/BMR' for Foundry ''
BuildFoundries: notice: copied grops font BMR
BuildFoundries: warning: line 41: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/CB' for Foundry ''
BuildFoundries: notice: copied grops font CB
BuildFoundries: warning: line 42: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/CBI' for Foundry ''
BuildFoundries: notice: copied grops font CBI
BuildFoundries: warning: line 43: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/CI' for Foundry ''
BuildFoundries: notice: copied grops font CI
BuildFoundries: warning: line 44: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/CR' for Foundry ''
BuildFoundries: notice: copied grops font CR
BuildFoundries: warning: line 45: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HB' for Foundry ''
BuildFoundries: notice: copied grops font HB
BuildFoundries: warning: line 46: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HBI' for Foundry ''
BuildFoundries: notice: copied grops font HBI
BuildFoundries: warning: line 47: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HI' for Foundry ''
BuildFoundries: notice: copied grops font HI
BuildFoundries: warning: line 48: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HNB' for Foundry ''
BuildFoundries: notice: copied grops font HNB
BuildFoundries: warning: line 49: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HNBI' for Foundry ''
BuildFoundries: notice: copied grops font HNBI
BuildFoundries: warning: line 50: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HNI' for Foundry ''
BuildFoundries: notice: copied grops font HNI
BuildFoundries: warning: line 51: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HNR' for Foundry ''
BuildFoundries: notice: copied grops font HNR
BuildFoundries: warning: line 52: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/HR' for Foundry ''
BuildFoundries: notice: copied grops font HR
BuildFoundries: warning: line 53: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/NB' for Foundry ''
BuildFoundries: notice: copied grops font NB
BuildFoundries: warning: line 54: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/NBI' for Foundry ''
BuildFoundries: notice: copied grops font NBI
BuildFoundries: warning: line 55: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/NI' for Foundry ''
BuildFoundries: notice: copied grops font NI
BuildFoundries: warning: line 56: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/NR' for Foundry ''
BuildFoundries: notice: copied grops font NR
BuildFoundries: warning: line 57: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/PB' for Foundry ''
BuildFoundries: notice: copied grops font PB
BuildFoundries: warning: line 58: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/PBI' for Foundry ''
BuildFoundries: notice: copied grops font PBI
BuildFoundries: warning: line 59: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/PI' for Foundry ''
BuildFoundries: notice: copied grops font PI
BuildFoundries: warning: line 60: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/PR' for Foundry ''
BuildFoundries: notice: copied grops font PR
BuildFoundries: warning: line 61: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/S' for Foundry ''
BuildFoundries: notice: copied grops font S
BuildFoundries: warning: line 62: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/TB' for Foundry ''
BuildFoundries: notice: copied grops font TB
BuildFoundries: warning: line 63: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/TBI' for Foundry ''
BuildFoundries: notice: copied grops font TBI
BuildFoundries: warning: line 64: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/TI' for Foundry ''
BuildFoundries: notice: copied grops font TI
BuildFoundries: warning: line 65: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/TR' for Foundry ''
BuildFoundries: notice: copied grops font TR
BuildFoundries: warning: line 66: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/ZCMI' for Foundry ''
BuildFoundries: notice: copied grops font ZCMI
BuildFoundries: warning: line 67: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/ZD' for Foundry ''
BuildFoundries: notice: copied grops font ZD
BuildFoundries: warning: line 68: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/../../font/devps/EURO' for Foundry ''
BuildFoundries: notice: copied grops font EURO


And here's the damaged, generated "download" file.


$ cat ./groff-1.23.0.3402-3eb27/_build/sub/font/devpdf/download
# foundry       ps-font-name    ps-font-file
# A blank foundry is the default.

                ../devps/freeeuro.pfa
U       CenturySchL-Bold        /usr/share/fonts/type1/gsfonts/c059016l.pfb
U       CenturySchL-BoldItal    /usr/share/fonts/type1/gsfonts/c059036l.pfb
U       CenturySchL-Ital        /usr/share/fonts/type1/gsfonts/c059033l.pfb
U       CenturySchL-Roma        /usr/share/fonts/type1/gsfonts/c059013l.pfb
U       Dingbats        /usr/share/fonts/type1/gsfonts/d050000l.pfb
U       NimbusMonL-Bold /usr/share/fonts/type1/gsfonts/n022004l.pfb
U       NimbusMonL-BoldObli     /usr/share/fonts/type1/gsfonts/n022024l.pfb
U       NimbusMonL-Regu /usr/share/fonts/type1/gsfonts/n022003l.pfb
U       NimbusMonL-ReguObli     /usr/share/fonts/type1/gsfonts/n022023l.pfb
U       NimbusRomNo9L-Medi      /usr/share/fonts/type1/gsfonts/n021004l.pfb
U       NimbusRomNo9L-MediItal  /usr/share/fonts/type1/gsfonts/n021024l.pfb
U       NimbusRomNo9L-Regu      /usr/share/fonts/type1/gsfonts/n021003l.pfb
U       NimbusRomNo9L-ReguItal  /usr/share/fonts/type1/gsfonts/n021023l.pfb
U       NimbusSanL-Bold /usr/share/fonts/type1/gsfonts/n019004l.pfb
U       NimbusSanL-BoldCond     /usr/share/fonts/type1/gsfonts/n019044l.pfb
U       NimbusSanL-BoldCondItal /usr/share/fonts/type1/gsfonts/n019064l.pfb
U       NimbusSanL-BoldItal     /usr/share/fonts/type1/gsfonts/n019024l.pfb
U       NimbusSanL-Regu /usr/share/fonts/type1/gsfonts/n019003l.pfb
U       NimbusSanL-ReguCond     /usr/share/fonts/type1/gsfonts/n019043l.pfb
U       NimbusSanL-ReguCondItal /usr/share/fonts/type1/gsfonts/n019063l.pfb
U       NimbusSanL-ReguItal     /usr/share/fonts/type1/gsfonts/n019023l.pfb
U       StandardSymL    /usr/share/fonts/type1/gsfonts/s050000l.pfb
U       URWBookmanL-DemiBold    /usr/share/fonts/type1/gsfonts/b018015l.pfb
U       URWBookmanL-DemiBoldItal        /usr/share/fonts/type1/gsfonts/b018035l.pfb
U       URWBookmanL-Ligh        /usr/share/fonts/type1/gsfonts/b018012l.pfb
U       URWBookmanL-LighItal    /usr/share/fonts/type1/gsfonts/b018032l.pfb
U       URWChanceryL-MediItal   /usr/share/fonts/type1/gsfonts/z003034l.pfb
U       URWGothicL-Book /usr/share/fonts/type1/gsfonts/a010013l.pfb
U       URWGothicL-BookObli     /usr/share/fonts/type1/gsfonts/a010033l.pfb
U       URWGothicL-Demi /usr/share/fonts/type1/gsfonts/a010015l.pfb
U       URWGothicL-DemiObli     /usr/share/fonts/type1/gsfonts/a010035l.pfb
U       URWPalladioL-Bold       /usr/share/fonts/type1/gsfonts/p052004l.pfb
U       URWPalladioL-BoldItal   /usr/share/fonts/type1/gsfonts/p052024l.pfb
U       URWPalladioL-Ital       /usr/share/fonts/type1/gsfonts/p052023l.pfb
U       URWPalladioL-Roma       /usr/share/fonts/type1/gsfonts/p052003l.pfb


comment #22:

> Branden's mega patch in comment #4 (91Kb) unfortunately broke the download file error checking. And I could not believe so many changes were needed just to integrate SS and StandardSymSL.pfb into devpdf.am,


Are you starting to believe it?  ;-)

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Jun 2025 09:05:14 PM UTC, comment #28: 

While merging my revamp of "devpdf.am" with your "SS" support patch, I ran again into some of the problems I originally hit, when doing a "make distcheck".


  GROFF    doc/automake.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GEN      doc/GMPfront.t
  GROFF    doc/groff-man-pages.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
gropdf: warning: unable to embed font file for 'Times-Roman' (TR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Bookman-Demi' (BMB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Bookman-LightItalic' (BMI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Times-Italic' (TI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-Bold' (HB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Times-Bold' (TB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Courier-Oblique' (CI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Courier' (CR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Symbol' (S) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Symbol-Slanted' (SS) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-BoldOblique' (HBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Courier-Bold' (CB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Times-BoldItalic' (TBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'AvantGarde-Book' (AR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'AvantGarde-BookOblique' (AI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'AvantGarde-Demi' (AB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'AvantGarde-DemiOblique' (ABI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Bookman-Light' (BMR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Bookman-DemiItalic' (BMBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Courier-BoldOblique' (CBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica' (HR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-Oblique' (HI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-Narrow' (HNR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-Narrow-Oblique' (HNI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-Narrow-Bold' (HNB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Helvetica-Narrow-BoldOblique' (HNBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'NewCenturySchlbk-Roman' (NR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'NewCenturySchlbk-Italic' (NI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'NewCenturySchlbk-Bold' (NB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'NewCenturySchlbk-BoldItalic' (NBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Palatino-Roman' (PR) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Palatino-Italic' (PI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Palatino-Bold' (PB) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'Palatino-BoldItalic' (PBI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'ZapfChancery-MediumItalic' (ZCMI) (missing entry in 'download' file?)
gropdf: warning: unable to embed font file for 'ZapfDingbats' (ZD) (missing entry in 'download' file?)
...
troff:man/groff_char.7:1915: warning: special character '+e' not defined
gropdf: warning: unable to embed font file for 'FreeEuro' (EURO) (missing entry in 'download' file?)
...
  GROFF    contrib/mom/examples/letter.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/mom-pdf.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/mon_premier_doc.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/sample_docs.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/slide-demo.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/copyright-default.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/copyright-chapter.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GROFF    contrib/mom/examples/typesetting.pdf
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1187, <__ANONIO__> line 4.
Use of uninitialized value $file in substr at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
Use of uninitialized value $file in concatenation (.) or string at /home/branden/src/GIT/groff/build/groff-1.23.0.3402-3eb27/_build/sub/gropdf line 1194, <__ANONIO__> line 4.
  GEN      doc/meref.me


This is mainly an FYI regarding sites of error-checking you may want to add to "download" file-reading, since it is demonstrably fragile when people go mucking about with groff's build system.

Distressingly, this time these problems didn't cause the build to fail.  We need an automated test of some kind to raise holy hell if font embedding doesn't work.

Because the build didn't fail, I don't know what the "download" file that caused all the problems looked like.  (The tree that Automake creates to do the "distcheck" gets erased upon success.)   I suspect I know, but I'll try to find out for sure.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Jun 2025 08:32:10 PM UTC, comment #27: 

Oh, and like the Spanish Inquisition I have a third gripe, which is that the build should not be screeching to a halt to a prompt the user for file replacement.


mv: replace 'font/devpdf/download', overriding mode 0444 (r--r--r--)?


This must be what you were talking about earlier when you characterized the build as "pausing".  (I thought you meant some sort of time delay, which struck me as supremely odd.)  Distributors will not accept this.  However I don't expect it to be hard to resolve.

Will advise.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Jun 2025 08:29:31 PM UTC, comment #26: 

We appear to be working along parallel but not identical lines, but making headway.

When applying a revised form of the patch presented in comment #23, and then your comment #8 patch, I get the following when "make distcheck"ing.


...
  GEN      font/devpdf/download
BuildFoundries: warning: line 33: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/AB' for Foundry ''
BuildFoundries: notice: copied grops font AB
BuildFoundries: warning: line 34: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/ABI' for Foundry ''
BuildFoundries: notice: copied grops font ABI
BuildFoundries: warning: line 35: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/AI' for Foundry ''
BuildFoundries: notice: copied grops font AI
BuildFoundries: warning: line 36: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/AR' for Foundry ''
BuildFoundries: notice: copied grops font AR
BuildFoundries: warning: line 37: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/BMB' for Foundry ''
BuildFoundries: notice: copied grops font BMB
BuildFoundries: warning: line 38: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/BMBI' for Foundry ''
BuildFoundries: notice: copied grops font BMBI
BuildFoundries: warning: line 39: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/BMI' for Foundry ''
BuildFoundries: notice: copied grops font BMI
BuildFoundries: warning: line 40: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/BMR' for Foundry ''
BuildFoundries: notice: copied grops font BMR
BuildFoundries: warning: line 41: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/CB' for Foundry ''
BuildFoundries: notice: copied grops font CB
BuildFoundries: warning: line 42: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/CBI' for Foundry ''
BuildFoundries: notice: copied grops font CBI
BuildFoundries: warning: line 43: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/CI' for Foundry ''
BuildFoundries: notice: copied grops font CI
BuildFoundries: warning: line 44: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/CR' for Foundry ''
BuildFoundries: notice: copied grops font CR
BuildFoundries: warning: line 45: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HB' for Foundry ''
BuildFoundries: notice: copied grops font HB
BuildFoundries: warning: line 46: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HBI' for Foundry ''
BuildFoundries: notice: copied grops font HBI
BuildFoundries: warning: line 47: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HI' for Foundry ''
BuildFoundries: notice: copied grops font HI
BuildFoundries: warning: line 48: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HNB' for Foundry ''
BuildFoundries: notice: copied grops font HNB
BuildFoundries: warning: line 49: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HNBI' for Foundry ''
BuildFoundries: notice: copied grops font HNBI
BuildFoundries: warning: line 50: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HNI' for Foundry ''
BuildFoundries: notice: copied grops font HNI
BuildFoundries: warning: line 51: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HNR' for Foundry ''
BuildFoundries: notice: copied grops font HNR
BuildFoundries: warning: line 52: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/HR' for Foundry ''
BuildFoundries: notice: copied grops font HR
BuildFoundries: warning: line 53: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/NB' for Foundry ''
BuildFoundries: notice: copied grops font NB
BuildFoundries: warning: line 54: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/NBI' for Foundry ''
BuildFoundries: notice: copied grops font NBI
BuildFoundries: warning: line 55: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/NI' for Foundry ''
BuildFoundries: notice: copied grops font NI
BuildFoundries: warning: line 56: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/NR' for Foundry ''
BuildFoundries: notice: copied grops font NR
BuildFoundries: warning: line 57: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/PB' for Foundry ''
BuildFoundries: notice: copied grops font PB
BuildFoundries: warning: line 58: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/PBI' for Foundry ''
BuildFoundries: notice: copied grops font PBI
BuildFoundries: warning: line 59: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/PI' for Foundry ''
BuildFoundries: notice: copied grops font PI
BuildFoundries: warning: line 60: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/PR' for Foundry ''
BuildFoundries: notice: copied grops font PR
BuildFoundries: warning: line 61: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/S' for Foundry ''
BuildFoundries: notice: copied grops font S
BuildFoundries: warning: line 62: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/TB' for Foundry ''
BuildFoundries: notice: copied grops font TB
BuildFoundries: warning: line 63: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/TBI' for Foundry ''
BuildFoundries: notice: copied grops font TBI
BuildFoundries: warning: line 64: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/TI' for Foundry ''
BuildFoundries: notice: copied grops font TI
BuildFoundries: warning: line 65: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/TR' for Foundry ''
BuildFoundries: notice: copied grops font TR
BuildFoundries: warning: line 66: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/ZCMI' for Foundry ''
BuildFoundries: notice: copied grops font ZCMI
BuildFoundries: warning: line 67: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/ZD' for Foundry ''
BuildFoundries: notice: copied grops font ZD
BuildFoundries: warning: line 68: Failed to create new font '/home/branden/src/GIT/groff/build/groff-1.23.0.3401-caf9a/_build/sub/../../font/devps/EURO' for Foundry ''
BuildFoundries: notice: copied grops font EURO
BuildFoundries: notice: generated U-AB
...
BuildFoundries: notice: generated U-ZCMI
BuildFoundries: notice: generated U-ZD
mv: replace 'font/devpdf/download', overriding mode 0444 (r--r--r--)? ^Cmake[1]: *** Deleting file 'font/devpdf/download'
make[1]: *** [Makefile:17547: font/devpdf/download] Interrupt
make: *** [Makefile:13868: distcheck] Interrupt


I have two gripes here.  One is the warnings about failing to create fonts for "Foundry ''", firstly that they happen at all in build and secondly that the last part of the message looks like we somehow screwed up the diagnostic.  One bit of my massive changes (which I never pushed) attempts to address that.

However, that need not be gating on resolving this ticket (or gropdf `SS` support), if what's happening is what I think it is, which is that this `cp`ing of files around to get make(1) prerequistes satisfied is frustrating the flexibility of Automake to work with both in- and out-of-tree builds.

As a rule, a file should be either (a) shipped with the distribution archive or (b) generated by the build, not sometimes one or the other depending on whether you're doing an in- or out-of-tree build.

I think I know what to do about this.  Will advise.

And I'll also look at SSv2.patch.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Jun 2025 07:55:57 PM UTC, comment #25: 

SSv2.patch. :-

In build directory:-

make clean
../configure --prefix=/home/derij/G
make -j
rm -rf ~/G/*
make install
ls ~/G/share/groff/1.23.0/font/devpdf/S*
/home/derij/G/share/groff/1.23.0/font/devpdf/S
/home/derij/G/share/groff/1.23.0/font/devpdf/SS
/home/derij/G/share/groff/1.23.0/font/devpdf/StandardSymSL.pfb
grep Symbol-Slanted ~/G/share/groff/1.23.0/font/devpdf/download
        Symbol-Slanted  StandardSymSL.pfb
make uninstall

  rmdir /home/derij/G/share/doc/groff-1.23.0; \
fi
make[2]: Leaving directory '/home/derij/groff-git/groff/build'
make[1]: Leaving directory '/home/derij/groff-git/groff/build'
[derij@pip build (master)]$ tree ~/G
/home/derij/G
├── bin
├── lib
│   └── X11
│       └── app-defaults
└── share
    ├── doc
    ├── info
    │   └── dir
    └── man
        ├── man1
        ├── man5
        └── man7

12 directories, 1 file

Seems clean, no make errors.

(file #57306)

Deri James <deri>
Group Member
Thu 19 Jun 2025 07:08:34 PM UTC, comment #24: 

Please don't push your patches in comment #8 quite yet.

They break the build for me when doing an out-of-tree build and uninstalling.


Uninstalling devpdf files
if test -d /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf; then \
  for f in `cd ./font/devpdf && grep -ls internalname [A-CEG-RT-Z]*`; do \
    rm -f /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf/$f; \
  done; \
  if test -d /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf/enc; then \
    rmdir /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf/enc; \
  fi; \
  if test -d /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf/map; then \
    rmdir /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf/map; \
  fi; \
  rm -f /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf/download; \
  rmdir /home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf; \
fi
rmdir: failed to remove '/home/branden/groff-HEAD/share/groff/1.23.0/font/devpdf': Directory not empty
make[2]: *** [Makefile:17496: uninstall_devpdf] Error 1
make[2]: Leaving directory '/home/branden/src/GIT/groff/build'
make[1]: *** [Makefile:14507: uninstall-am] Error 2
make[1]: Leaving directory '/home/branden/src/GIT/groff/build'
make: *** [Makefile:11642: uninstall-recursive] Error 1


This problem does not occur with an in-tree build.

Probably an oversight in "devpdf.am".  I'll look into it.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Jun 2025 06:21:16 PM UTC, comment #23: 

At 2025-06-19T13:49:05-0400, Deri James wrote:

> Follow-up Comment #22, bug #67207 (group groff):
>
> comment #20:
> > (This side quest is threatening to overrun this ticket's actual purpose,
> > which suggests opening a new one, but substantial history for both issues is
> > already here, so they're hard to disentangle now.)
>
> Even more, this started in bug #65098 in response to Branden's
> problems with devpdf.am. (The fix for the named problem of this bug
> was the patch in comment #2, and is also part of the SS patch set in
> comment #8, which also would close bug #65098 as well).
>
> Branden's mega patch in comment #4 (91Kb) unfortunately broke the download
> file error checking. And I could not believe so many changes were needed just
> to integrate SS and StandardSymSL.pfb into devpdf.am,


Well, I have to admit, part of that was misery I brought on myself by
trying to make "font/devpdf/devpdf.am" less clever and more
idiomatically Automakey.

Here's that change, which doesn't exist in Savannah Git, just my
checkout.


commit 47f8ea1ad422730111e773bbe5deb957e9c898a9
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Jun 8 12:42:57 2025 -0500

    font/devpdf/devpdf.am: Refactor.

    This change also ships font description file names for the "pdf" output
    device corresponding to the 8 new font description files for CJK script
    support recently added for the "{x,}html", "ps", and "utf8" devices.

    These are intended as abstractions of faces to permit consistent naming
    while permitting customization, just as with the 12 text typefaces
    supported across output devices for Latin scripts in groff (three
    families of four styles each).  These CJK font descriptions are not
    organized into groff font families, but are similar.  They are not
    mounted by default.

            CSH: Simplified Chinese, Hei style
            CSS: Simplified Chinese, Song style
            CTH: Traditional Chinese, Hei style
            CTS: Traditional Chinese, Song style
            JPG: Japanese, Gothic style
            JPM: Japanese, Mincho style
            KOG: Korean, Gothic style
            KOM: Korean, Mincho style

    * font/devpdf/devpdf.am: Make this script more Automake-idiomatic (I
      think) and resemble other groff Automake scripts more closely.

      (devpdf_builddir): Define macro.

      (GROFF_FONT_FILES, ENC_FILES, MAP_FILES): Drop macros populated by
      shell command substitution in favor of static file lists...

      (DEVPDFFONTFILES_FROM_DEVPS): ...like this...

      (DEVPDFFONTFILES_FOR_URW) [HAVE_URW_FONTS]: ...and this.

      (DEVPDFFONTFILES): New macro contains only
      `DEVPDFFONTFILES_FROM_DEVPS` plus the "download" and "DESC" files.

      (devpdffontdata, devpdffontencdata): Rationalize contents, aligning
      files and macro contents with installation requirements so Automake
      takes care of installing and uninstalling them.

      (MOSTLYCLEANFILES): Add `devpdffontdata`, `devpdffontencdir`,
      `devpdffontmapdir`, so that Automake takes care of cleaning them.

      ($(DEVPDFFONTFILES_FROM_DEVPS)): New target copies "ps" device's font
      descriptions to build's "pdf" device data directory.

      ($(devpdffontencdata)): Now that the "text.enc" encoding file name is
      stored in a macro, use it and compute its basename instead of using
      literals.

      ($(DEVPDFFONTFILES_FOR_URW)): Make the "pdf" device's "download" file
      depend on this macro's contents, which may be empty if
      `HAVE_URW_FONTS` is not defined by the "configure" script.

      (font/devpdf/stamp): Respell dependencies using above macros.

      (mostlyclean-local, mostlyclean_devpdf_extra)
      (install-data-local, install_devpdf)
      (uninstall_groffdirs, uninstall_devpdf): Drop targets made redundant
      by better population of `devpdf*data` macros above.


> so I had a go, and the patch is only 5Kb and I can't detect any
> problems with it's operation.


Some of them might resurrect when I re-apply the foregoing.  I'll find
out.

> I was hoping Branden would be able to give it a once over to confirm
> it does not cause a problem to the build system, but I know he's busy
> so it would probably help him if I commit the patch and close both
> bugs.


I'm working on this today.  I haven't tested your new patch yet but I
notice that it introduces a new "download.in" file which I'll bet will
solve one of the problems I ran into, which was "BuildFoundries.pl"
getting mad, finding the input "download" file unacceptable, and
producing a nearly empty one for devpdf, containing only an entry for
the "FreeEuro" font--and without throwing much if anything in the way of
diagnostic messages, which drove me bonkers.

I'm starting to think we can make life easier for everyone if we get
BuildFoundries.pl out of the business of being involved in the build.
While we normally want to dogfood things (and I enjoyed the opportunity
to exercise groff's otherwise little-used pfbtops program as part of
the build), you and I have repeatedly pulled "BuildFoundries.pl" in
different directions with respect to error reporting handling.

And I think I know why: when I run it from the build, I want it to be
super-paranoid and bring the build to a crashing halt as soon as it
encounters anything even slightly unexpected, whereas end users who just
want their damn third-party fonts to be seen by groff so they can use
them, want the tool to bullishly move forward until it can't, or it gets
the job done.

So I'm getting the notion that "devpdf.am" should run afmtodit and
sed(1) or whatever else it needs to create build artifacts (including
"download", which your patch may now be taking care of already,
relieving "BuildFoundries.pl" of that responsibility.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Jun 2025 05:49:02 PM UTC, comment #22: 

comment #20:

> (This side quest is threatening to overrun this ticket's actual purpose, which suggests opening a new one, but substantial history for both issues is already here, so they're hard to disentangle now.)


Even more, this started in bug #65098 in response to Branden's problems with devpdf.am. (The fix for the named problem of this bug was the patch in comment #2, and is also part of the SS patch set in comment #8, which also would close bug #65098 as well).

Branden's mega patch in comment #4 (91Kb) unfortunately broke the download file error checking. And I could not believe so many changes were needed just to integrate SS and StandardSymSL.pfb into devpdf.am, so I had a go, and the patch is only 5Kb and I can't detect any problems with it's operation.

I was hoping Branden would be able to give it a once over to confirm it does not cause a problem to the build system, but I know he's busy so it would probably help him if I commit the patch and close both bugs.

Deri James <deri>
Group Member
Thu 19 Jun 2025 05:30:20 PM UTC, comment #21: 

Try it now.


commit 6c64fbedc9eacf2014cc40ef96c45cfb2806afa2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 19 11:34:23 2025 -0500

    [tmac]: Fix nonportable test.

    * tmac/tests/an-ext_SY-and-YS-work.sh: Use printf(1), not echo(1), when
      an argument contains backslashes.  Thanks to Dave Kemper and Deri
      James for reporting test failures arising from the non-portability of
      backslash usage in echo(1) arguments, which frustratingly did not
      create problems on any systems readily available to me.


G. Branden Robinson <gbranden>
Group administrator
Wed 18 Jun 2025 07:57:51 PM UTC, comment #20: 

comment #18:

> the .SY line has interpreted "\\-" as "\-" but the following
> line it has stayed as "\\-". Must be a bug in echo


My "echo" appears to be interpreting all backslashes the same; it is groff that differentiates them.  I simplified the test case, and had it show raw output from "echo" and then that same output piped into groff.

$ cat echo-test
#!/bin/sh

input3='.
.TH foo 1
.P
.SY \\%command\\-name
\\%\\-\\-interminable\\-option
.'

echo "$input3"
echo "$input3" | groff -rLL=80n -man -T ascii -P -cbou
$ ./echo-test
.
.TH foo 1
.P
.SY \\%command\\-name
\\%\\-\\-interminable\\-option
.
foo(1)                       General Commands Manual                      foo(1)

     command-name \%\-\-interminable\-option

                                                                          foo(1)

This makes sense to me; groff ought to parse backslashes differently in macro arguments than in top-level input.  But it doesn't explain why Deri and I see different results than Branden does.

The above output is effectively the same--having only whitespace differences--whether I use groff 1.22.4, 1.23, or git HEAD.

(This side quest is threatening to overrun this ticket's actual purpose, which suggests opening a new one, but substantial history for both issues is already here, so they're hard to disentangle now.)

Dave <barx>
Group Member
Wed 18 Jun 2025 05:41:46 PM UTC, comment #19: 

comment #18:

> You have probably realised the culprit is "echo". Looking at the -Z output:-


I had not, but that would have been one of the first places I looked.

I did builds on my Debian(-ish) bullseye system, on Android/Termux, and on Solaris 10 and 11 using Git HEAD, and could not reproduce this problem on any of them.

Nevertheless, `echo` is a notorious source of trouble.


> C\-
> h24
> tname
> C\-
> h24
> tcan
> C\-
> h24
> tyou
> C\-
> h24
> tbelieve
> C\-
> h24
> tit
> n40 0
> f1
> V400
> H216
> t\%\-\-equally\-bafflingly\-garrulous\-and\-interminable\-option


> You can see the .SY line has interpreted "\\-" as "\-" but the following line it has stayed as "\\-". Must be a bug in echo, slash interpretation is either on or off, not "on sometimes"!! Using "echo -e" for $input3 avoids the bug.


Unfortunately that's not portable, either.  I'll have to use printf(1).

> [derij@pip build (master)]$ sh --version
> GNU bash, version 5.2.15(1)-release (x86_64-mageia-linux-gnu)


My build environments:

Solaris 10: bash 3.2.51
Solaris 11: bash 4.4.19
Debian bullseye: bash 5.1.4
Android/Termux: bash 5.2.37

All succeed for me.

I can't explain the discrepant outcomes.  It may be that there is a second problem, but backslashes in the argument to `echo` are a hazard regardless--thanks for catching this!  I'll do something about it and see if that clears up the failures for you and Dave.

G. Branden Robinson <gbranden>
Group administrator
Wed 18 Jun 2025 10:34:25 AM UTC, comment #18: 

You have probably realised the culprit is "echo". Looking at the -Z output:-

C\-
h24
tname
C\-
h24
tcan
C\-
h24
tyou
C\-
h24
tbelieve
C\-
h24
tit
n40 0
f1
V400
H216
t\%\-\-equally\-bafflingly\-garrulous\-and\-interminable\-option

You can see the .SY line has interpreted "\\-" as "\-" but the following line it has stayed as "\\-". Must be a bug in echo, slash interpretation is either on or off, not "on sometimes"!! Using "echo -e" for $input3 avoids the bug.

[derij@pip build (master)]$ sh --version
GNU bash, version 5.2.15(1)-release (x86_64-mageia-linux-gnu)

Deri James <deri>
Group Member
Wed 18 Jun 2025 01:56:07 AM UTC, comment #17: 

My output from the test is identical to what Deri posted in comment #11.

My grep is pretty crusty: GNU grep 3.5.

Dave <barx>
Group Member
Wed 18 Jun 2025 12:32:03 AM UTC, comment #16: 

  When a test fails one should check the output from the shell invocation

export abs_top_builddir=<path>
sh -x ./<test-file> |& less

  The test does not fail neither in master nor in my local version.

The test fails with "bash" (GNU bash, version 5.2.37(1)-release
(x86_64-pc-linux-gnu)

env | grep -F SHELL

SHELL=/bin/bash

In Makefile for master:

SHELL = /usr/bin/sh
POSIX_SHELL_PROG = /bin/sh

In Makefile for my local version:

POSIX_SHELL_PROG = /bin/sh
SHELL = /usr/bin/sh


Bjarni Ingi Gislason <bjarniig>
Wed 18 Jun 2025 12:24:36 AM UTC, comment #15: 

At 2025-06-17T19:51:15-0400, Deri James wrote:

> Follow-up Comment #13, bug #67207 (group groff):
>
> I've done a bisect (since you can't reproduce):-


> [derij@pip build ((106ceff39...)|BISECTING)]$ git bisect good
> 4bdcefea1dea94b7991f1626e53ce5a22ff194d4 is the first bad commit
> commit 4bdcefea1dea94b7991f1626e53ce5a22ff194d4
> Author: G. Branden Robinson <g.branden.robinson@gmail.com>
> Date:   Fri Jun 6 13:24:10 2025 -0500
>
>     tmac/an-ext.tmac: Don't use \c after 1 arg to SY.

Yup, that was the most likely candidate.

Good call on reporting your `grep` version; I might have stepped on a
portability cow patty.

Will investigate.

G. Branden Robinson <gbranden>
Group administrator
Wed 18 Jun 2025 12:01:25 AM UTC, comment #14: 

my version of grep:-

[derij@pip build (master)]$ grep --version
grep (GNU grep) 3.11
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others; see
<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>.

grep -P uses PCRE2 10.42 2022-12-11


Deri James <deri>
Group Member
Tue 17 Jun 2025 11:51:11 PM UTC, comment #13: 

I've done a bisect (since you can't reproduce):-
*verbatim+
[derij@pip build ((106ceff39...)|BISECTING)]$ git bisect good
4bdcefea1dea94b7991f1626e53ce5a22ff194d4 is the first bad commit
commit 4bdcefea1dea94b7991f1626e53ce5a22ff194d4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jun 6 13:24:10 2025 -0500

    tmac/an-ext.tmac: Don't use \c after 1 arg to SY.
   
    * tmac/an-ext.tmac (SY): The single-argument form of `SY` need not set
      an ubreakable space and output line continuation character after
      formatting the argument.  That distinction is in fact the whole point
      of accepting a second argument (a new post-1.23 feature), which is set
      in bold like the first.  (It is why you would write `.SY foo bar`
      rather than `.SY "foo bar".)
   
    * tmac/groff_man.7.man.in (Synopsis macros) <SY>: Document this fact.
   
    Fixes a regression from groff 1.23.0.  Thanks to Alex Colomar for the
    report.

 ChangeLog                           | 14 ++++++++++++++
 tmac/an-ext.tmac                    |  2 +-
 tmac/groff_man.7.man.in             |  6 ++++++
 tmac/tests/an-ext_SY-and-YS-work.sh | 22 +++++++++++++++++++++-
 4 files changed, 42 insertions(+), 2 deletions(-)
-verbatim-
I have also run the test with 'set -xe' at the top, captured in log file. I hope this helps.

I hope your testing of my patch works.


(file #57303)

Deri James <deri>
Group Member
Tue 17 Jun 2025 11:10:24 PM UTC, comment #12: 

Thanks, Deri.  Hmmmm.  That's a head-scratcher.  I'll have to figure out why the test doesn't fail for me.

Leaving in "Need Info" state because we do need info--from me, on how well your patches from comment #8 work for me.

G. Branden Robinson <gbranden>
Group administrator
Tue 17 Jun 2025 10:36:58 PM UTC, comment #11: 

It's the same one as Dave reported:-

[derij@pip build (master)]$ ../tmac/tests/an-ext_SY-and-YS-work.sh
foo(1)                       General Commands Manual                      foo(1)

Name
     foo \- a command with a very short name

Synopsis
     This pre-synopsis text is not often used in practice.

     foo operand1 operand2 operand3 operand4 operand5 operand6 operand6 operand7
         operand8 operand9

     foo -h
     foo --help
     This post-synopsis text is not often used in practice.

Description
     The real work is done by bar(1).

groff test suite                   2023-05-13                             foo(1)
checking for 1v of space before non-nested SY request
checking for correct indentation of broken synopsis lines
checking for lack of space before nested SY request
checking for lack of space after YS request
foo(3)                      Library Functions Manual                      foo(3)

Name
     foo \- a small library for converting strings to integers

Synopsis
     int a2i(TYPE, TYPE *restrict n, const char *s,
             char **_Nullable restrict endp, int base, TYPE min, TYPE max);
     int a2s(TYPE, TYPE *restrict n, const char *s,
             char **_Nullable restrict endp, int base, TYPE min, TYPE max);
     unsigned int a2u(TYPE, TYPE *restrict n, const char *s,
             char **_NotNullable restrict endp, int base, TYPE min, TYPE max);

groff test suite                   2024-05-06                             foo(3)
checking for indentation reuse
checking for automatic hyphenation disablement inside synopsis
foo(1)                       General Commands Manual                      foo(1)

Name
     foo \- frobnicate a bar

Synopsis
     foo --baz

     ridiculously-long-command-name-can-you-believe-it
         \%\-\-equally\-bafflingly\-garrulous\-and\-interminable\-option

groff test suite                   2025-06-06                             foo(1)
checking that long unbreakable words do not overset
...FAILED


Deri James <deri>
Group Member
Tue 17 Jun 2025 10:18:20 PM UTC, comment #10: 

Hi Deri,

Quick aside:

comment #8:

> Make, make check (1 error, been present for a while, not to do with gropdf),


This is a surprise to me.  I don't push without ensuring that the tree is green for both "make check" and "make distcheck" (rarely, a commit within the series causes a test failure, but a subsequent one, nearly always the very next, corrects the failure).

Can you re-run the failing test as described in "INSTALL.extra" and quote/attach the output here?



G. Branden Robinson <gbranden>
Group administrator
Mon 16 Jun 2025 05:59:39 PM UTC, comment #9: 

Here's eqn2.trf:-

.EQ
sin ( alpha + beta ) = sin alpha cos beta + cos alpha sin beta
.EN


Deri James <deri>
Group Member
Mon 16 Jun 2025 05:56:43 PM UTC, comment #8: 

Hi Branden,

I may have an answer. The attached download.in, SS and StandardSymSL.pfb files should be put into font/devpdf and the SS.patch applied to current master. The eqn2.trf could be run in one of your test scripts:-

[derij@pip build (master)]$ test-groff -Tpdf -ms -e eqn2.trf > eqn2.pdf
[derij@pip build (master)]$ pdffonts eqn2.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
EOGPWF+Symbol-Slanted                Type 1            Custom           yes yes no       8  0
Symbol                               Type 1            Custom           no  no  no      11  0
Times-Roman                          Type 1            Custom           no  no  no      14  0

And the Symbol-Slanted font should be present (the first five characters are random - indicate it subsetted).

Make, make check (1 error, been present for a while, not to do with gropdf), make install seem to be working. Make distcheck has a pause, press "y" to continue, it also has the new "overset" warning. Tested in tree, separate build directory and repeat after make clean.

Why does make distcheck create a directory where all files/directories are read only? (This is the reason for the pause).


(file #57295, file #57296, file #57297, file #57298)

Deri James <deri>
Group Member
Sun 15 Jun 2025 03:22:42 PM UTC, comment #7: 

Hi Deri,

Quick reply as I expect to be tied up most of today.

At 2025-06-15T09:26:13-0400, Deri James wrote:

> Follow-up Comment #6, bug #67207 (group groff):
> I have a problem with your "diffy". I tested it by running this command (to
> produce a Japanese man page):-
>
> [derij@pip build (master)]$ test-groff -Tpdf -man -fG -petk -F
> /usr/share/groff/site-font/ -mja groff.7 |okular -
>
> In the download file in that directory:-
>
>         SauceHanSansJP-B
> /usr/share/groff/site-font/devps/SauceHanSansJP-B.pfb
>         SauceHanSansJP-BI
> /usr/share/groff/site-font/devps/SauceHanSansJP-BI.pfb
>         SauceHanSansJP-BV
> /usr/share/groff/site-font/devps/SauceHanSansJP-BV.pfb
>         SauceHanSansJP-I
> /usr/share/groff/site-font/devps/SauceHanSansJP-I.pfb
>         SauceHanSansJP-R
> /usr/share/groff/sitefont/devps/SauceHanSansJP-R.pfb
>         SauceHanSansJP-V
> /usr/share/groff/site-font/devps/SauceHanSansJP-V.pfb
>
> I introduced a typo in the entry for "SauceHanSansJP-R" (missing
> hyphen in the filename).


That's a good test scenario.

> When I ran with the current gropdf I get:-
>
> [derij@pip build (master)]$ groff -Tpdf -man -fG -petk -F
> /usr/share/groff/site-font/ -mja groff.7 |okular -
> gropdf: warning: The download file in '/usr/share/groff/site-font/devpdf'  has
> erroneous entry for 'SauceHanSansJP-R (GR)'
> troff:groff.7:1084: warning: special character 'u3002' not defined
>
> But if I run with the diff applied, I get:-
>
> [derij@pip build (master)]$ test-groff -Tpdf -man -fG -petk -F
> /usr/share/groff/site-font/ -mja groff.7 |okular -
> troff:groff.7:1084: warning: special character 'u3002' not defined
>
> No message about the problem entry.


Hmm, yes.

> I realise your code is more complex than the original,


Not for its own sake.  I didn't touch BuildFoundries.pl or gropdf.pl
until I had to.

> but I don't quite understand what you are trying to "improve".


After making the two changes at the end of the diff, the 1/2 and 2/2 to
close the "SS" support ticket, I ran into land mine after land mine when
doing a build.  As I recall (this has been a days' long process), a few
occurred with a conventional in-tree build, but what really went to hell
was "make distcheck".  If you apply just those 2 patches and then try
that yourself, I feel sure you'll hit most or all of the problems I did.

Some very odd things went wrong, but right now I don't have time to
elaborate or recreate the numerous failures I encountered.

For the most part, the problems weren't thrown where they actually
happened, at the appropriate place to catch them.  As with your example
of the misspelled name, they showed up only later.

So the scenario you raise is one I'd like to restore good support for in
a revision of my patch/commit series.  I've been focused on having a
working build from a "good" source tree, which ideally isn't going to
feature typos in "download" files.

> To my mind the original message identifies the exact download file the
> exact entry which caused the issue and the groff font name affected
> (GR). I don't need to know which other download files I have read
> before finding the problem, since that information is superfluous to
> fixing the issue. Please can you explain your thinking behind adding
> the complexity in your code.


See above.  Again, I think helpful diagnosis of your typo scenario is
important to have, so I'll have to refactor to catch it.  If we can
think of an easy way to introduce a regression test for that, I'd be
eager to incorporate it.  (And maybe worth "porting" to grops as well.)

> Apologies if I'm barking up the wrong tree, but I do consider a typo
> in the filename to be worthy of a warning.


Me too.

> Perhaps if you explained what you were trying to achieve I can knock
> up some code for gropdf.


My goal is: "make distcheck" works, which necessarily implies that all
tests pass (or "XFAIL") when building in the checked-out tree and in
an arbitrary directory into which the distribution archive is unpacked.

G. Branden Robinson <gbranden>
Group administrator
Sun 15 Jun 2025 01:26:08 PM UTC, comment #6: 

Hi Branden,

I have a problem with your "diffy". I tested it by running this command (to produce a Japanese man page):-

[derij@pip build (master)]$ test-groff -Tpdf -man -fG -petk -F /usr/share/groff/site-font/ -mja groff.7 |okular -

In the download file in that directory:-

        SauceHanSansJP-B        /usr/share/groff/site-font/devps/SauceHanSansJP-B.pfb
        SauceHanSansJP-BI       /usr/share/groff/site-font/devps/SauceHanSansJP-BI.pfb
        SauceHanSansJP-BV       /usr/share/groff/site-font/devps/SauceHanSansJP-BV.pfb
        SauceHanSansJP-I        /usr/share/groff/site-font/devps/SauceHanSansJP-I.pfb
        SauceHanSansJP-R        /usr/share/groff/sitefont/devps/SauceHanSansJP-R.pfb
        SauceHanSansJP-V        /usr/share/groff/site-font/devps/SauceHanSansJP-V.pfb

I introduced a typo in the entry for "SauceHanSansJP-R" (missing hyphen in the filename). When I ran with the current gropdf I get:-

[derij@pip build (master)]$ groff -Tpdf -man -fG -petk -F /usr/share/groff/site-font/ -mja groff.7 |okular -
gropdf: warning: The download file in '/usr/share/groff/site-font/devpdf'  has erroneous entry for 'SauceHanSansJP-R (GR)'
troff:groff.7:1084: warning: special character 'u3002' not defined

But if I run with the diff applied, I get:-

[derij@pip build (master)]$ test-groff -Tpdf -man -fG -petk -F /usr/share/groff/site-font/ -mja groff.7 |okular -
troff:groff.7:1084: warning: special character 'u3002' not defined

No message about the problem entry. I realise your code is more complex than the original, but I don't quite understand what you are trying to "improve". To my mind the original message identifies the exact download file the exact entry which caused the issue and the groff font name affected (GR). I don't need to know which other download files I have read before finding the problem, since that information is superfluous to fixing the issue. Please can you explain your thinking behind adding the complexity in your code.

Apologies if I'm barking up the wrong tree, but I do consider a typo in the filename to be worthy of a warning. Perhaps if you explained what you were trying to achieve I can knock up some code for gropdf.

Deri James <deri>
Group Member
Sun 15 Jun 2025 01:14:55 AM UTC, comment #5: 

Whoops--the grohtml change is not relevant to this ticket.  Off-by-one error in my Git command.  Please disregard.

(The devutf8 change isn't relevant, either, but since it's in the contiguous set of commits, it's more troublesome to elide.)

G. Branden Robinson <gbranden>
Group administrator
Sun 15 Jun 2025 12:05:46 AM UTC, comment #4: 

Thanks for the feedback, Deri.  I think I know what I need to proceed.

Landing `SS` support for gropdf is proving to be quite the tangle.

Here's a forward-chronological log of relevant commits in my working tree.

At the top of this I'll be inserting a change to address bug #59284.

I'll also attach a "diffy" version of this log, showing the code changes.


commit 5f75a971a667465719cd5f94fe6c6f0e9f7c96bb
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Jun 14 18:13:24 2025 -0500

    [grohtml]: Disclose more info in fatal diagnostic.

    * src/devices/grohtml/post-html.cpp (html_printer::set_style): Disclose
      name of font description file lacking `internalname` directive in
      fatal diagnostic when this is the case.

commit 820790f7f8b41972b6e376c8f6ef4b6dce71023a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Jun 8 12:42:57 2025 -0500

    font/devpdf/devpdf.am: Refactor.

    This change also ships font description file names for the "pdf" output
    device corresponding to the 8 new font description files for CJK script
    support recently added for the "{x,}html", "ps", and "utf8" devices.

    These are intended as abstractions of faces to permit consistent naming
    while permitting customization, just as with the 12 text typefaces
    supported across output devices for Latin scripts in groff (three
    families of four styles each).  These CJK font descriptions are not
    organized into groff font families, but are similar.  They are not
    mounted by default.

            CSH: Simplified Chinese, Hei style
            CSS: Simplified Chinese, Song style
            CTH: Traditional Chinese, Hei style
            CTS: Traditional Chinese, Song style
            JPG: Japanese, Gothic style
            JPM: Japanese, Mincho style
            KOG: Korean, Gothic style
            KOM: Korean, Mincho style

    * font/devpdf/devpdf.am: Make this script more Automake-idiomatic (I
      think) and resemble other groff Automake scripts more closely.

      (devpdf_builddir): Define macro.

      (GROFF_FONT_FILES, ENC_FILES, MAP_FILES): Drop macros populated by
      shell command substitution in favor of static file lists...

      (DEVPDFFONTFILES_FROM_DEVPS): ...like this...

      (DEVPDFFONTFILES_FOR_URW) [HAVE_URW_FONTS]: ...and this.

      (DEVPDFFONTFILES): New macro contains only
      `DEVPDFFONTFILES_FROM_DEVPS` plus the "download" and "DESC" files.

      (devpdffontdata, devpdffontencdata): Rationalize contents, aligning
      files and macro contents with installation requirements so Automake
      takes care of installing and uninstalling them.

      (MOSTLYCLEANFILES): Add `devpdffontdata`, `devpdffontencdir`,
      `devpdffontmapdir`, so that Automake takes care of cleaning them.

      ($(DEVPDFFONTFILES_FROM_DEVPS)): New target copies "ps" device's font
      descriptions to build's "pdf" device data directory.

      ($(devpdffontencdata)): Now that the "text.enc" encoding file name is
      stored in a macro, use it and compute its basename instead of using
      literals.

      ($(DEVPDFFONTFILES_FOR_URW)): Make the "pdf" device's "download" file
      depend on this macro's contents, which may be empty if
      `HAVE_URW_FONTS` is not defined by the "configure" script.

      (font/devpdf/stamp): Respell dependencies using above macros.

      (mostlyclean-local, mostlyclean_devpdf_extra)
      (install-data-local, install_devpdf)
      (uninstall_groffdirs, uninstall_devpdf): Drop targets made redundant
      by better population of `devpdf*data` macros above.

commit 9bad0c0b2a62e3245d1ab7b18f59e27dc546e374
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Jun 10 06:49:24 2025 -0500

    gropdf(1): Document East Asian typeface support.

    * src/devices/gropdf/gropdf.1.man (Usage): Do it.

    * src/devices/grohtml/grohtml.1.man (Typefaces):
    * src/devices/grops/grops.1.man (Typefaces):
    * src/devices/grotty/grotty.1.man (Typefaces): Add gropdf(1) to the list
      of output drivers supporting this scheme.

    See https://savannah.gnu.org/bugs/?62830 for background.  As Deri noted
    there, gropdf "already handles CJK documents".  The change here is to
    improve document portability across groff output drivers by permitting
    an author to abstract away (or be indifferent to) the exact face
    providing CJK glyph coverage, in much the same way that an author using
    a language in the Latin script can restrict the document's explicit
    typeface usage to "R", "I", "B", and "BI".

commit 96960aa9639d74417eb07b1b4589a50123d92053
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jun 13 17:39:21 2025 -0500

    [devpdf]: Fix `BuildFoundries.pl` warning text.

    * font/devpdf/util/BuildFoundries.pl (UseGropsVersion): Interpolate
      correct variable name in warning diagnostic.

commit 510c9fad16d44c9e989f97cbe3948843ca6c07a3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Jun 14 08:44:09 2025 -0500

    [devpdf]: Stop BuildFoundries.pl from clobbering.

    * font/devpdf/util/BuildFoundries.pl (UseGropsVersion): Don't overwrite
      a font description file if it already exists.  Revise emitted warning
      diagnostic when one of the (now) multiple conditions preventing its
      writing fails.

commit c903bca0e8a91a74f25e049a90012d082cd0be31
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jun 13 19:32:18 2025 -0500

    [devpdf]: Fix dupe `close()` in BuildFoundries.pl.

    * font/devpdf/util/BuildFoundries.pl (UseGropsVersion): Drop redundant
      `close()` of `GF` file handle.

      (RunAfmtodit, UseGropsVersion): Also move non-duplicate `close()`
      calls to occur much earlier, as soon as we're done reading from a file
      handle, to reduce risk of late/duplicate placement being restored.

commit 31bf70c4adf21302adc7070762b52fe4e077cb9b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jun 13 18:56:00 2025 -0500

    [devpdf]: Die more when BuildFoundries.pl strict.

    * font/devpdf/util/BuildFoundries.pl: Make more scenarios fatal when
      `--strict` command-line option specified.  Clarify the applicable
      diagnostic messages.

      (RunAfmtodit, UseGropsVersion): When being strict, if a font
      description file doesn't have exactly 1 `internalname` directive, die
      instead of warning.

      (UseGropsVersion, LoadFoundry): When being strict, if a font
      description file (for gropdf) can't be created, die instead of
      warning.

commit a0452f28544c17cdf838e59b6ee7e24823e407ac
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 15:14:55 2025 -0500

    [devpdf]: Trivially refactor "BuildFoundries.pl".

    * font/devpdf/util/BuildFoundries.pl: Rename scalars for clarity.
      Rename global `where` scalar to `destDir`.  Rename global scalar `lct`
      to `lineNumber`, since it is used only in diagnostic messages to make
      reports about validity problems in a file being read.

      (LoadFoundry, LoadDownload, CheckFoundry): Rename local scalar `fn` to
      `fileName`.

      (Notice, Warn, Die, Msg): Rename local scalar `msg` to `message` so
      that we don't have two identifiers that differ only in lettercase.

commit e356854dd17f7ebebb77f61a1865d938864f9614
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 15:18:40 2025 -0500

    [devpdf]: Refactor diags in "BuildFoundries.pl".

    * font/devpdf/util/BuildFoundries.pl: Refactor diagnostic production.
      Demote scalar `lineNumber` from global scope...
      (LoadFoundry): ...to a local one, here.

      (FileWarn): New subroutine reports diagnostics relevant to parsing of
      an input file in GNU standard format.

      (LoadFoundry): Migrate file-applicable diagnostic message from `Warn`
      to `FileWarn`.

      (Warn): Drop report of line number, so that we won't report an
      irrelevant one (with no corresponding file name!) when diagnosing
      problems unrelated to input file parsing.

    See <https://www.gnu.org/prep/standards/standards.html#Errors>.

commit 0aaac0004d53090c03fbf7c29faa268aa0ecf77c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 15:45:53 2025 -0500

    [devpdf]: Recast diags in "BuildFoundries.pl".

    * font/devpdf/util/BuildFoundries.pl: Recast diagnostic messages.

      (LoadFoundry, RunAfmtodit): Say simply "font description file",
      dropping "groff"; (1) this file format is used by other
      device-independent troffs and (2) now that we say "font _description_
      file", it's adequately distinguished from the term "font file",
      applicable to e.g., PFA, OTF, or TTF files.

      (LoadFoundry, CheckFoundry): Generalize fatal diagnostic upon Perl
      `open` failure to say simply "cannot open" (when reading) and "cannot
      create" (when writing) and report Perl's error message using `$!`.

      (LoadFoundry, RunAfmtodit, UseGropsVersion): Spell "foundry"
      thus--uncapitalized--in diagnostic messages that refer to a specific
      foundry name (such as "U" for "URW"), rather than to the "Foundry"
      file this program reads as input.

commit 6c3fddb55599ddccf16e1eb7372d7cccb54ced95
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Jun 14 10:05:39 2025 -0500

    [devpdf]: Refactor "BuildFoundries.pl" (1/3).

    * font/devpdf/util/BuildFoundries.pl (UseGropsVersion): Refactor for
      clarity.  Add new local scalar `doWrite` to control whether we attempt
      to write a (grops-based) font description file for gropdf(1).
      Restructure conditionals accordingly, and drop recently added
      diagnostic warning (when being "strict") that we're not attempting to
      perform the rewrite of an existing file.

commit a91bbd5a642eaf7d49fbc720686bc7d49699991d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jun 13 08:00:36 2025 -0500

    [devpdf]: Refactor "BuildFoundries.pl" (2/3).

    * font/devpdf/util/BuildFoundries.pl: Refactor.

      (RunAfmtodit, UseGropsVersion): Pull duplicated logic to open a groff
      font description file, extract the argument to its `internalname`
      directive if there is one, emit a diagnostic if there is none or more
      than one, and return that argument as a PostScript font name out of
      here...
      (GetPostScriptFontName): ...into here.

      (UseGropsVersion): However, since there was one difference, retain
      here the logic to re-read the lines of the groff font description file
      into an array so they can be rewritten into gropdf(1)'s copy thereof.
      Rename file handle `GF` to `PDFGF` when writing, so that we don't use
      the same name to read one file name and write another.

    This does mean a duplicative file open and read, but "BuildFoundries" is
    seldom run, and never by anything in groff except its Makefiles.  (On
    the other hand, Deri is contemplating plans that might change this...see
    comment #15 to <https://savannah.gnu.org/bugs/?65098>.)  Should those
    eventuate, we might have `GetPostScriptFontName()` return a list.

commit cc5b7de7b9783788745b9b4bd9538886a62ee03c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Jun 13 15:31:12 2025 -0500

    [devpdf]: Refactor "BuildFoundries.pl" (3/3).

    * font/devpdf/util/BuildFoundries.pl: Refactor.

      (DescribeFoundry): New subroutine turns a `$foundry` identifier into a
      human-readable description.  The default foundry is an empty string,
      which can look confusing and/or unintended in diagnostic messages,
      distracting the user from real problems.

      (GetPostScriptFontName, UseGropsVersion): Use it.

commit 7bb52b828f58a3fa7e2ebe11ead8f5cb19554125
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Jun 9 13:18:47 2025 -0500

    font/devutf8/devutf8.am: Tweak generated "DESC".

    * font/devutf8/devutf8.am (DEVUTF8FONTS): Tweak ordering of mounted CJK
      faces in "DESC" file generated for "utf8" output device.  Consistently
      arrange the Hei (~serif) faces before the Song (~sans-serif) ones.

commit c0055923afc69cb5518978398af1422d7717e0e5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Jun 9 13:51:29 2025 -0500

    font/devpdf/devpdf.am: Fix up "download" file gen.

    * font/devpdf/devpdf.am (font/devpdf/download): Explicitly remove the
      target before (re)constructing it because if we don't, BuildFoundries
      will opportunistically open it and modify it in place, leading to the
      banner created with `echo` being uselessly repeated.  (Potentially, it
      could retain stale data in other respects.)

commit 118df3b24bceec3aececc12578db92b2ec3a2d01
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Jun 14 10:36:50 2025 -0500

    [gropdf]: Trivially refactor.

    * src/devices/gropdf/gropdf.pl (do_x): Trivially refactor.  Rename
      scalar `FDnm` to `fileName`.

commit 1014a26181675dfe3c2e2f879a00b3bbbfb3b70b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Jun 14 10:46:33 2025 -0500

    [gropdf]: Refactor.

    * src/devices/gropdf/gropdf.pl (OpenInc): Rename this subroutine...
      (OpenInclusionFile): ...to this.  Also rename local scalars for
      clarity, and give them clearer semantics.  `fn` becomes `arg`, and is
      the untransformed actual parameter passed in.  Rename `fnm` to
      `fileName`, which is used only when the subroutine performs a
      transformation on `arg` (when it is not an absolute filespec, the code
      tries to locate it by prefixing with elements of the `idirs` list).

      (do_x): Update call site.

commit c2bc47240e6ada2b77180ab6bc57a7f91729f338
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 16:52:32 2025 -0500

    [gropdf]: Use stricter DOS/Windows filespec check.

    * src/devices/gropdf/gropdf.pl (OpenFile, OpenInclusionFile): Make check
      MS-DOS/Windows-style absolute filespec stricter; not only must the
      second character be ':', but the first must be an uppercase Basic
      Latin letter.

commit f3f31d4a30362b0d7e98aec36da84c035a8992b6
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 18:33:03 2025 -0500

    [gropdf]: Refactor `OpenFile()`.

    * src/devices/gropdf/gropdf.pl (OpenFile): Refactor to more closely
      resemble `OpenInclusionFile()`, since they are quite similar in
      purpose.  Instead of modifying arguments, return a 2-list containing a
      file handle (or undef), and the name of the file argument as resolved
      to its actual location when sought {which is unchanged if absolute}.
      Copy stricter MS-DOS/ Windows-style absolute filespec check from
      `OpenInclusionFile()`.

      (LoadDownload, LoadDesc, LoadFont, GetType1): Update call sites to new
      calling convention.

commit 76133cbf52398bfa2712321fb8c418cddaa59477
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 18:55:38 2025 -0500

    [gropdf]: Slightly refactor `OpenInclusionFile()`.

    * src/devices/gropdf/gropdf.pl (OpenInclusionFile): Refactor to make
      subroutine single-return.

commit 43a9a6002db64ce5c03b7b354df920c545823e41
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 09:59:52 2025 -0500

    [gropdf]: Warn on invalid "download" file entries.

    * src/devices/gropdf/gropdf.pl: Throw warning diagnostics when
      encountering invalid "download" file entries.

      (ParseWarn): New subroutine throws warning diagnostic with file
      name and line number information.

      (LoadDownload): Use it.

commit 8dfe92063e0cbbd299a576480418129ad8e07ed6
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 15:03:34 2025 -0500

    [gropdf]: Report all attempted "download" files.

    ...if none could be opened.

    * src/devices/gropdf/gropdf.pl: Report locations of all "download" files
      attempted for reading if problems were encountered with any of them.
      Add `attemptedDownloadFiles` list and `foundAnyDownloadFiles` scalar
      (Boolean-valued).  Prior to exiting, test `foundAnyDownloadFiles` for
      falsity, and emit the report as a fatal diagnostic.

      (LoadDownload): Drop `found` scalar and fatal diagnostic emitted if
      none are found; instead populate and update the new globals with each
      unsuccessful `open()` of a "download" file.

commit 357bd3b74b0b4a402ccaea5598bd4805fc272d7a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 15:08:38 2025 -0500

    [gropdf]: Slightly refactor `LoadDownload()`.

    * src/devices/gropdf/gropdf.pl (LoadDownload): Rename local scalars for
      clarity.
        `f`      -> `df` (a file handle)
        `lineno` -> `lineNumber`
        `file`   -> `fontFile`
      Also populate `downloadFile` using `OpenFile()`'s new more helpful
      return type.

commit cae4215279c569d3a2a2b02dbcfabbe0a67bca35
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Jun 12 14:27:10 2025 -0500

    [gropdf]: Improve font embedding failure diags.

    * src/devices/gropdf/gropdf.pl:  Add global list `nonEmbeddedFonts` to
      accommodate legacy feature of "standard" fonts that don't get embedded
      (and which is still gropdf's default behavior).  Add global scalar
      `hadAnyEmbeddingProblems` (Boolean-valued).  Prior to exiting, test
      `hadAnyEmbeddingProblems` for truth, and emit a report of attempted
      "download" files.

      (LoadDownload): If not embedding all fonts and we just encountered one
      marked with a `*` prefix indicating its "standard" status, push its
      key onto the `nonEmbeddedFonts` list.

      (LoadFont): Reorganize embedding failure logic to base failure on the
      absence of a font key from the `nonEmbeddedFonts` list instead of the
      key's presence in the `missing` hash.  Upon failure to embed a font,
      make `hadAnyEmbeddingProblems` true.  Recast warning diagnostics to
      use groff-idiomatic phrasing.

commit be08a01c220c2dbc13e3941fdcf490493fa6bc6a
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
Date:   Mon Jul 3 15:44:29 2023 +0100

    [devpdf,gropdf]: Add `SS` font support (1/2).

    Replace pseudo-slanted characters with a real font, improving typography
    of, e.g., slanted lowercase Greek letters as used in eqn(1).

    * font/devpdf/StandardSymSL.pfb:
    * font/devpdf/SS: Add new files.

    * font/devpdf/DESC.in: Mount `SS` font at position 6.

    * tmac/pdf.tmac: Drop `pdf:SS` macro defining fallback character with a
      slant of 16 degrees for the argument, and 28 calls of it for 24
      lowercase Greek letters and 4 variant forms.

    Fixes <https://savannah.gnu.org/bugs/?65098> (1/2).

commit 5c8d684ef82adcc1454dededd5f8dcb461683b56
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Jun 10 08:35:28 2025 -0500

    [devpdf]: Add `SS` font support (2/2).

    Ship "StandardSymSL.pfb" embeddable font file and "SS" font description
    file for it.

    * font/devpdf/devpdf.am (DEVPDFFONTFILES_FROM_DEVPS): Add `SS`.
      (font/devpdf/download): Use sed(1) to interpolate an entry for
      "Symbol-Slanted" into the "download" file.

      (install-data-local, install_devpdf, uninstall-local)
      (uninstall_devpdf): Hook into Automake {,un}installation targets to
      cope with heretofore latent bug: gropdf doesn't know how about build
      trees that differ from source trees.  (In fact, it doesn't know about
      environments that aren't installations at all, which is mostly a good
      thing.)  Unfortunately this limitation prevents the
      "StandardSymSL.pfb" file from being embedded in "groff-man-pages.pdf",
      where we'd like to use it for the eqn(1) man page.  As the comment
      notes, if we generate "StandardSymSL.pfb" from source, we can add a
      make(1) rule for it, put its name in the `devpdffontdata` macro, and
      not have to mess with it in these {,un}install hooks at all.  (We
      might want to retain the uninstall hook to remove the `devpdffontdir`
      directory.)

    Fixes <https://savannah.gnu.org/bugs/?65098> (2/2).


(file #57293)

G. Branden Robinson <gbranden>
Group administrator
Sat 14 Jun 2025 11:44:24 PM UTC, comment #3: 

Adding dep on bug #59284.

G. Branden Robinson <gbranden>
Group administrator
Tue 10 Jun 2025 02:16:54 PM UTC, comment #2: 

Does this patch make it easier for you? Allow multiple -F flags.

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 409f15284..115bc3bd9 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -463,6 +463,7 @@ sub usage
 }

 my $fd;
+my @fdlist;
 my $frot;
 my $fpsz;
 my $embedall=0;
@@ -489,7 +490,7 @@ my $thisfnt;
 my $parcln=qr/\[[^\]]*?\]|(.)((?!\1).)*\1/;
 my $parclntyp=qr/(?:[\d\w]|\([+-]?[\S]{2}|$parcln)/;

-if (!GetOptions('F=s' => \$fd, 'I=s' => \@idirs, 'l' => \$frot,
+if (!GetOptions('F=s' => \@fdlist, 'I=s' => \@idirs, 'l' => \$frot,
     'p=s' => \$fpsz, 'd!' => \$debug, 'help' => \$want_help, 'pdfver=f' => \$PDFver,
     'v' => \$version, 'version' => \$version, 'opt=s' => \$options,
     'e' => \$embedall, 'y=s' => \$Foundry, 's' => \$stats,
@@ -499,6 +500,7 @@ if (!GetOptions('F=s' => \$fd, 'I=s' => \@idirs, 'l' => \$frot,
 }

 unshift(@idirs,'.');
+$fd=join('@RT_SEP@',@fdlist) if $#fdlist > -1;

 &usage(0) if ($want_help);


Deri James <deri>
Group Member
Tue 10 Jun 2025 02:01:34 PM UTC, comment #1: 

I know why it barfs if font is in src only. :-)

FFLAG is set to "-F src -F dest". Only one of these gets through!

troff man says see GROFF_FONT_PATH, which says multiple dirs can be separated by ':', so FFLAG="-F src:dest" should work but I am working on a patch to allow multiple -F flags as well.

Deri James <deri>
Group Member
Tue 10 Jun 2025 10:36:04 AM UTC, original submission:  

Background from a ChangeLog entry I'll be pushing soon.


2025-06-09  G. Branden Robinson <g.branden.robinson@gmail.com>

        [devpdf]: Ship "StandardSymSL.pfb" embeddable font file and "SS"
        font description file for it.

        * font/devpdf/devpdf.am (DEVPDFFONTFILES_FROM_DEVPS): Add `SS`.
        (font/devpdf/download): Use sed(1) to interpolate an entry for
        "Symbol-Slanted" into the "download" file.
        (install-data-local, install_devpdf, uninstall-local)
        (uninstall_devpdf): Hook into Automake {,un}installation targets
        to cope with heretofore latent bug: gropdf doesn't know how
        about build trees that differ from source trees.  (In fact, it
        doesn't know about environments that aren't installations at
        all, which is mostly a good thing.)  Unfortunately this
        limitation prevents the "StandardSymSL.pfb" file from being
        embedded in "groff-man-pages.pdf", where we'd like to use it for
        the eqn(1) man page.  As the comment notes, if we generate
        "StandardSymSL.pfb" from source, we can add a make(1) rule for
        it, put its name in the `devpdffontdata` macro, and not have to
        mess with it in these {,un}install hooks at all.  (We might want
        to retain the uninstall hook to remove the `devpdffontdir`
        directory.)

        Fixes <https://savannah.gnu.org/bugs/?65098> (2/2).


As noted in bug #65098, my preference is to solve this by "building StandardSymSL.pfb from source", analogously to how grops handles "freeeuro.pfa".

Assigning to Deri for his feedback and/or alternative ideas.

G. Branden Robinson <gbranden>
Group administrator

 

Attached Files

Attached Files
file #57308:  SSv3.patch added by deri (5.5KiB - text/x-patch)
file #57306:  SSv2.patch added by deri (5.2KiB - text/x-patch)
file #57303:  log added by deri (12KiB - application/octet-stream)
file #57295:  download.in added by deri (34B - application/octet-stream)
file #57296:  StandardSymSL.pfb added by deri (14KiB - application/x-font-type1)
file #57297:  SS added by deri (1.6KiB - application/octet-stream)
file #57298:  SS.patch added by deri (4.5KiB - text/x-patch)
file #57293:  for-67207.diff added by gbranden (91KiB - text/x-patch)

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

Digest:
   bug dependencies.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by bjarniig (Posted a comment)
  • -email is unavailable- added by deri (Posted a comment)
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follow 29 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-07-24 gbranden Assigned togbranden deri
    2025-06-29 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2025-06-27 gbranden StatusNone In Progress
    2025-06-20 gbranden StatusNeed Info None
    2025-06-20 gbranden DependenciesRemoved dependency from bugs #65098 -
    2025-06-20 gbranden DependenciesRemoved dependency to bugs #59284 -
    2025-06-20 deri StatusIn Progress Need Info
    2025-06-20 deri Attached File- Added SSv3.patch, #57308
    2025-06-19 gbranden StatusNeed Info In Progress
    2025-06-19 barx Carbon-CopyRemoved 93119 -
    2025-06-19 deri Attached File- Added SSv2.patch, #57306
        StatusIn Progress Need Info
    2025-06-19 gbranden StatusNeed Info In Progress
    2025-06-17 deri Attached File- Added log, #57303
    2025-06-17 deri Assigned toderi gbranden
    2025-06-17 gbranden StatusIn Progress Need Info
        Assigned togbranden deri
    2025-06-16 deri Attached File- Added download.in, #57295
        Attached File- Added StandardSymSL.pfb, #57296
        Attached File- Added SS, #57297
        Attached File- Added SS.patch, #57298
    2025-06-15 gbranden Attached File- Added for-67207.diff, #57293
        StatusNeed Info In Progress

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code