gbranden pushed a commit to branch master
in repository groff.
commit e74fa1ac38ed9b30ba40ebc3208c7034cf7cf3c0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Jul 4 05:06:36 2025 -0500
[gropdf]: Improve diagnostic messages.
* src/devices/gropdf/gropdf.pl: Recast diagnostic messages to describe
the default foundry in a less confusing way. Add new scalar,
`foundryDescription`, to store the string "default foundry" when the
foundry would otherwise be reported as an empty string, which could
mislead the user into thinking that a variable has gone
unintentionally unpopulated.
(LoadFont): Update phrasing of diagnostics to work with new
scalar.
---
ChangeLog | 11 +++++++++++
src/devices/gropdf/gropdf.pl | 8 ++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 699b3642f..10ce705b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-07-04 G. Branden Robinson <[email protected]>
+
+ * src/devices/gropdf/gropdf.pl: Recast diagnostic messages to
+ describe the default foundry in a less confusing way. Add new
+ scalar, `foundryDescription`, to store the string "default
+ foundry" when the foundry would otherwise be reported as an
+ empty string, which could mislead the user into thinking that a
+ variable has gone unintentionally unpopulated.
+ (LoadFont): Update phrasing of diagnostics to work with new
+ scalar.
+
2025-07-04 G. Branden Robinson <[email protected]>
* src/devices/gropdf/gropdf.pl (LoadFont): Recast diagnostic
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index ae5efe04d..ee6f70ce6 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -3405,7 +3405,9 @@ sub LoadFont
Die("unable to open font '$ofontnm' for mounting") if !defined($f);
my $foundry='';
+ my $foundryDescription="default foundry";
$foundry=$1 if $fontnm=~m/^(.)-/;
+ $foundryDescription="foundry \"$1\"" if $foundry;
my $stg=1;
my %fnt;
my @fntbbox=(0,0,0,0);
@@ -3532,7 +3534,9 @@ sub LoadFont
if (exists($missing{$fontkey}))
{
Warn("The download file in '$missing{$fontkey}' "
- . " has erroneous entry for '$fnt{internalname} ($ofontnm)'");
+ . " has erroneous entry for '$fnt{internalname}'"
+ . " (groff font description file '$ofontnm' from"
+ . " $foundryDescription)");
}
else
{
@@ -3540,7 +3544,7 @@ sub LoadFont
$sub=\&Die if ($makeWarningsFatal);
&$sub("cannot embed font file for '$fnt{internalname}'; no"
. " 'download' file has an entry for groff font description"
- . " file '$ofontnm'") if $embedall;
+ . " file '$ofontnm' from $foundryDescription") if $embedall;
}
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit