On Saturday, 12 November 2022 19:43:35 GMT G. Branden Robinson wrote: > gbranden pushed a commit to branch master > in repository groff. > > commit 4753f2b17b8d836cf66fcb17f5412239e8b45743 > Author: G. Branden Robinson <g.branden.robin...@gmail.com> > AuthorDate: Tue Nov 8 19:26:24 2022 -0600 > > [gropdf]: Provide more info in diagnostic message. > > * src/devices/gropdf/gropdf.pl: Provide more information in diagnostic > issued when an embeddable font is required by the document and listed > in the "download" file, but can't be opened. > > (LoadDownload): Construct a "path" of each file specification > attempted. Store this as the value for the hash `missing` keyed on > the tuple of scalars `foundry` and `name`, instead of the name of the > device description directory, which isn't very helpful for > troubleshooting. Also: don't start message clause with a capital > letter (per GNU Coding Standards); double quote file name references; > and move parenthesized groff font name outside of single quotes. > > (LoadFont): Recast diagnostic message to communicate the foregoing > information. Also make embedding failure messages more consistent in > style. > --- > ChangeLog | 17 +++++++++++++++++ > src/devices/gropdf/gropdf.pl | 20 ++++++++++++++------ > 2 files changed, 31 insertions(+), 6 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index 0f12dd1f4..08979492c 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,20 @@ > +2022-11-08 G. Branden Robinson <g.branden.robin...@gmail.com> > + > + * src/devices/gropdf/gropdf.pl: Provide more information in > + diagnostic issued when an embeddable font is required by the > + document and listed in the "download" file, but can't be opened. > + (LoadDownload): Construct a "path" of each file specification > + attempted. Store this as the value for the hash `missing` keyed > + on the tuple of scalars `foundry` and `name`, instead of the > + name of the device description directory, which isn't very > + helpful for troubleshooting. Also: don't start message clause > + with a capital letter (per GNU Coding Standards); double quote > + file name references; and move parenthesized groff font name > + outside of single quotes. > + (LoadFont): Recast diagnostic message to communicate the > + foregoing information. Also make embedding failure messages > + more consistent in style. > + > 2022-11-08 Deri James <d...@chuzzlewit.myzen.co.uk> > > [gropdf]: Cater for invalid entries in download file. > diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl > index 594a1463c..df25b3d5d 100644 > --- a/src/devices/gropdf/gropdf.pl > +++ b/src/devices/gropdf/gropdf.pl > @@ -673,7 +673,14 @@ sub LoadDownload > > if (!-r $pth) > { > - $missing{"$foundry $name"}="$dir/$devnm"; > + if (exists($missing{"$foundry $name"})) > + { > + $missing{"$foundry $name"}.=":$pth"; > + } > + else > + { > + $missing{"$foundry $name"}="$pth"; > + } > next; > } > > @@ -2550,14 +2557,15 @@ sub LoadFont > { > if (exists($missing{$fontkey})) > { > - Warn("The download file in '$missing{$fontkey}' " > - . " has erroneous entry for '$fnt{internalname} ($ofontnm)'"); > + Warn("unable to embed font file for '$fnt{internalname}'" > + . " ($ofontnm); check \"download\" file(s) (tried: " > + . "\"$missing{$fontkey}\")"); > } > else > { > - Warn("unable to embed font file for '$fnt{internalname}'" > - . " ($ofontnm) (missing entry in 'download' file?)") > - if $embedall; > + Warn("unable to embed font file for '$fnt{internalname}'" > + . " ($ofontnm); no entry for it in \"download\" file(s)") > + if $embedall; > } > $fno=++$objct; > $fontlst{$fontno}->{OBJ}=BuildObj($objct, > > _______________________________________________ > Groff-commit mailing list > groff-com...@gnu.org > https://lists.gnu.org/mailman/listinfo/groff-commit
Hi Branden, Please revert this until we have finished our discussion. You are too quick for me, I wish I could type as fast as you. Thank you. Cheers Deri