groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 08/09: make-afmtodit-tables: Automate AGL reassignments.


From: G. Branden Robinson
Subject: [groff] 08/09: make-afmtodit-tables: Automate AGL reassignments.
Date: Wed, 2 Sep 2020 09:25:09 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 423b0080eadda44ddaa85d8040aff2420df2865f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Sep 2 22:39:42 2020 +1000

    make-afmtodit-tables: Automate AGL reassignments.
    
    Automate the procedure done manually in
    b72b91e85e80a69304e6569db535bcca0e0ecab5 (9 April 2007), so that it
    doesn't regress when we regenerate afmtodit.tables.
    
    * src/utils/afmtodit/make-afmtodit-tables: Do it.
    * src/utils/afmtodit/afmtodit.tables: Regenerate it.
---
 ChangeLog                               | 11 +++++++++++
 src/utils/afmtodit/afmtodit.tables      | 15 +++++++--------
 src/utils/afmtodit/make-afmtodit-tables | 20 +++++++++++++++-----
 3 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c25fb29..eeb7469 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2020-09-02  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       make-afmtodit-tables: Automate AGL reassignments.
+
+       Automate the procedure done manually in
+       b72b91e85e80a69304e6569db535bcca0e0ecab5 (9 April 2007), so that
+       it doesn't regress when we regenerate afmtodit.tables.
+
+       * src/utils/afmtodit/make-afmtodit-tables: Do it.
+       * src/utils/afmtodit/afmtodit.tables: Regenerate it.
+
+2020-09-02  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/roff/groff/groff.1.man (Options) <-E>:
        * src/roff/troff/troff.1.man (Options) <-E>: Document that -E
        implies -Ww.
diff --git a/src/utils/afmtodit/afmtodit.tables 
b/src/utils/afmtodit/afmtodit.tables
index 57a0657..412b34d 100644
--- a/src/utils/afmtodit/afmtodit.tables
+++ b/src/utils/afmtodit/afmtodit.tables
@@ -1,6 +1,6 @@
 # This table has been algorithmically derived from the file
 # UnicodeData.txt, version 4.1.0, available from unicode.org,
-# on 2005-12-09.
+# on 2020-09-02.
 my %unicode_decomposed = (
   "00C0", "0041_0300",
   "00C1", "0041_0301",
@@ -2036,10 +2036,9 @@ my %unicode_decomposed = (
   "2FA1D", "2A600",
 );
 
-# This table has been algorithmically derived from the file glyphlist.txt,
-# version 2.0, available from partners.adobe.com, on 2005-12-09.  For glyphs
-# 'Delta', 'Omega', and 'mu', the values have been manually changed to the
-# ones from aglfn.txt, version 1.6.
+# This table has been algorithmically derived from the file
+# glyphlist.txt, version 2.0, available from partners.adobe.com,
+# on 2020-09-02.  See "groff:" comments for altered mappings.
 my %AGL_to_unicode = (
   "A", "0041",
   "AE", "00C6",
@@ -2130,7 +2129,7 @@ my %AGL_to_unicode = (
   "Ddotbelow", "1E0C",
   "Decyrillic", "0414",
   "Deicoptic", "03EE",
-  "Delta", "0394",
+  "Delta", "0394", # groff: not U+2206
   "Deltagreek", "0394",
   "Dhook", "018A",
   "Digammagreek", "03DC",
@@ -2419,7 +2418,7 @@ my %AGL_to_unicode = (
   "Omacron", "014C",
   "Omacronacute", "1E52",
   "Omacrongrave", "1E50",
-  "Omega", "03A9",
+  "Omega", "03A9", # groff: not U+2126
   "Omegacyrillic", "0460",
   "Omegagreek", "03A9",
   "Omegaroundcyrillic", "047A",
@@ -4544,7 +4543,7 @@ my %AGL_to_unicode = (
   "mpasquare", "33AB",
   "mssquare", "33B3",
   "mturned", "026F",
-  "mu", "03BC",
+  "mu", "03BC", # groff: not U+00B5
   "mu1", "00B5",
   "muasquare", "3382",
   "muchgreater", "226B",
diff --git a/src/utils/afmtodit/make-afmtodit-tables 
b/src/utils/afmtodit/make-afmtodit-tables
index 7851710..2b899c9 100755
--- a/src/utils/afmtodit/make-afmtodit-tables
+++ b/src/utils/afmtodit/make-afmtodit-tables
@@ -109,20 +109,30 @@ echo ''
 cat <<END
 # This table has been algorithmically derived from the file
 # glyphlist.txt, version 2.0, available from partners.adobe.com,
-# on `date '+%Y-%m-%d'`.
+# on `date '+%Y-%m-%d'`.  See "groff:" comments for altered mappings.
 END
 
-# Emit second table.
-echo 'my %AGL_to_unicode = ('
+# Convert AGL syntax to a chunk of Perl.
 cat "$3" \
 | sed -e '/#/d' \
       -e 's/ /_/g' \
       -e '/;\(E\|F[0-8]\)/d' \
-      -e 's/\(.*\);\(.*\)/  "\1", "\2",/'
+      -e 's/\(.*\);\(.*\)/  "\1", "\2",/' > $$5
+
+# Perform groff replacements.
+sed \
+  -e 's/\("Delta"\), "2206",$/\1, "0394", # groff: not U+2206/' \
+  -e 's/\("Omega"\), "2126",$/\1, "03A9", # groff: not U+2126/' \
+  -e 's/\("mu"\), "00B5",$/\1, "03BC", # groff: not U+00B5/' \
+  < $$5 > $$6
+
+# Emit second table.
+echo 'my %AGL_to_unicode = ('
+cat $$6
 echo ');'
 
 # Remove temporary files.
-rm $$1 $$2 $$3 $$4
+rm $$1 $$2 $$3 $$4 $$5 $$6
 
 # Local Variables:
 # fill-column: 72



reply via email to

[Prev in Thread] Current Thread [Next in Thread]