gbranden pushed a commit to branch master
in repository groff.

commit 389b3e7f0951b3decbccbb59f872ebad0f5d2742
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Aug 5 03:39:38 2025 -0500

    [afmtodit]: Don't warn on expected dupe code pts.
    
    * src/utils/afmtodit/afmtodit.pl: Stop throwing duplicate mapping
      warning diagnostics in a handful of cases where we expect them.  (All
      are cases of classical Greek letters repurposed for technical
      applications).  Per James Cloos, some redundant character code points,
      and thus duplicate Unicode->AGL mappings, exist to preserve round-trip
      compatibility when converting between character sets.
    
    ANNOUNCE: Acknowledge James.
---
 ANNOUNCE                       |  1 +
 ChangeLog                      | 10 ++++++++++
 src/utils/afmtodit/afmtodit.pl |  9 ++++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/ANNOUNCE b/ANNOUNCE
index e581e541e..b695d32dd 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -183,6 +183,7 @@ Heinz-Jürgen Oertel
 Helge Kreutzmann
 Ian Ropers
 Ingo Schwarze
+James Cloos
 Jeff Conrad
 Joerg van den Hoff
 Jonathan Gray
diff --git a/ChangeLog b/ChangeLog
index c48b23afb..ff19197d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-08-05  G. Branden Robinson <[email protected]>
+
+       * src/utils/afmtodit/afmtodit.pl: Stop throwing duplicate
+       mapping warning diagnostics in a handful of cases where we
+       expect them.  (All are cases of classical Greek letters
+       repurposed for technical applications).  Per James Cloos, some
+       redundant character code points, and thus duplicate Unicode->AGL
+       mappings, exist to preserve round-trip compatibility when
+       converting between character sets.
+
 2025-08-03  G. Branden Robinson <[email protected]>
 
        * src/utils/afmtodit/afmtodit.pl: Fix up new diagnostic message
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index 75dd4c9de..99c975e9a 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -490,7 +490,14 @@ if (!$opt_x) {
            $u =~ s/^_/u/;
            if ($u) {
                if (defined $mapped{$u}) {
-                   whine("both $mapped{$u} and $ch map to $u");
+                   # Don't whine about duplicates that exist to
+                   # preserve round-trip conversions; thanks to James
+                   # Cloos for pointing this out.
+                   if (!(($mapped{$u} eq 'Delta' and ($ch eq 'uni0394'))
+                        or ($mapped{$u} eq 'mu' and ($ch eq 'uni03BC'))
+                        or ($mapped{$u} eq 'uni03A9' and ($ch eq 'uni2126')))) 
{
+                       whine("both $mapped{$u} and $ch map to $u");
+                   }
                }
                else {
                    $mapped{$u} = $ch;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to