gbranden pushed a commit to branch master
in repository groff.
commit 0236f342eb8aa514f197ea06fb1c721e8fdc0821
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Jul 4 12:14:19 2025 -0500
[gropdf]: Refactor `OpenFontFile()`.
* src/devices/gropdf/gropdf.pl (OpenFontFile): Refactor. This
subroutine no longer does anything with its second argument (of
three), so eliminate it.
(LoadDesc, LoadFont, GetType1): Update call sites.
---
ChangeLog | 7 +++++++
src/devices/gropdf/gropdf.pl | 9 ++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 41f5fe309..31443e75a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-07-04 G. Branden Robinson <[email protected]>
+
+ * src/devices/gropdf/gropdf.pl (OpenFontFile): Refactor. This
+ subroutine no longer does anything with its second argument (of
+ three), so eliminate it.
+ (LoadDesc, LoadFont, GetType1): Update call sites.
+
2025-07-04 G. Branden Robinson <[email protected]>
[gropdf]: Use stricter MS-DOS/Windows filespec check.
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 60431d647..8625fd381 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1231,7 +1231,6 @@ sub LoadDownload
sub OpenFontFile
{
my $f=shift;
- my $dirs=shift;
my $fileName=shift;
my $resolvedFileName;
@@ -1267,7 +1266,7 @@ sub LoadDesc
{
my $f;
- OpenFontFile(\$f,$fontPath,"DESC");
+ OpenFontFile(\$f,"DESC");
Die("failed to open device description file 'DESC'")
if !defined($f);
@@ -3434,13 +3433,13 @@ sub LoadFont
return $fontlst{$fontno}->{OBJ} if (exists($fontlst{$fontno}) and $fontnm
eq $fontlst{$fontno}->{FNT}->{name}) ;
my $f;
- OpenFontFile(\$f,$fontPath,$fontnm);
+ OpenFontFile(\$f,$fontnm);
if (!defined($f) and $Foundry)
{
# Try with no foundry
$fontnm=~s/.*?-//;
- OpenFontFile(\$f,$fontPath,$fontnm);
+ OpenFontFile(\$f,$fontnm);
}
Die("unable to open font '$ofontnm' for mounting") if !defined($f);
@@ -3615,7 +3614,7 @@ sub GetType1
my ($head,$body,$tail); # Font contents
my $f;
- OpenFontFile(\$f,$fontPath,"$file");
+ OpenFontFile(\$f,"$file");
Die("unable to open font '$file' for embedding") if !defined($f);
$head=GetChunk($f,1,"currentfile eexec");
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit