groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/33: [tmac]: Follow up Savannah #63112 fix.


From: G. Branden Robinson
Subject: [groff] 03/33: [tmac]: Follow up Savannah #63112 fix.
Date: Sun, 16 Oct 2022 15:52:15 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit bdd03c834461c82d8845392af5135c57db0069c9
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Oct 10 10:08:43 2022 -0500

    [tmac]: Follow up Savannah #63112 fix.
    
    * tmac/latin2.tmac:
    * tmac/latin5.tmac:
    * tmac/latin9.tmac: Perform the character remapping shenanigans of the
      fix for Savannah #63112 only if the output device is "latin1" (a
      terminal using an 8-bit character encoding).  Only then can we be sure
      that Latin-1 glyphs will be unavailable when other encodings are used
      and that `\N` escape sequences will identify correct glyph indices in
      a font (because there is no font per se accessible to groff--simply a
      terminal implementing a character encoding).
---
 ChangeLog        | 13 +++++++++++++
 tmac/latin2.tmac |  4 ++++
 tmac/latin5.tmac |  4 ++++
 tmac/latin9.tmac |  4 ++++
 4 files changed, 25 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a772f2b01..161b702e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/latin2.tmac:
+       * tmac/latin5.tmac:
+       * tmac/latin9.tmac: Perform the character remapping shenanigans
+       of the fix for Savannah #63112 only if the output device is
+       "latin1" (a terminal using an 8-bit character encoding).  Only
+       then can we be sure that Latin-1 glyphs will be unavailable when
+       other encodings are used and that `\N` escape sequences will
+       identify correct glyph indices in a font (because there is no
+       font per se accessible to groff--simply a terminal implementing
+       a character encoding).
+
 2022-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/devices/gropdf/gropdf.pl (GetType1): Clarify diagnostic.
diff --git a/tmac/latin2.tmac b/tmac/latin2.tmac
index 506c49119..f73f4e880 100644
--- a/tmac/latin2.tmac
+++ b/tmac/latin2.tmac
@@ -2,6 +2,8 @@
 .\"
 .do nr *groff_latin2_tmac_C \n[.cp]
 .cp 0
+.
+.if '\*[.T]'latin1' \{\
 .\" Replace characters that ISO Latin-1 has but Latin-2 doesn't.
 .char \[r!] \ \" space
 .char \[ct] \ \" space
@@ -125,6 +127,8 @@
 .char \[u a"] \N'251'
 .char \[t ac] \N'254'
 .char \[a.] \N'255'
+.\} \" using -Tlatin1
+.
 .\" Translate eight-bit input characters.
 .\" 0xA0
 .\" char160 (no-break space) is translated on input
diff --git a/tmac/latin5.tmac b/tmac/latin5.tmac
index 8719b5660..63a4871dd 100644
--- a/tmac/latin5.tmac
+++ b/tmac/latin5.tmac
@@ -2,6 +2,8 @@
 .\"
 .do nr *groff_latin5_tmac_C \n[.cp]
 .cp 0
+.
+.if '\*[.T]'latin1' \{\
 .\" Replace characters that ISO Latin-1 has but Latin-5 doesn't.
 .char \[-D] \ \" space
 .char \[Sd] \ \" space
@@ -17,6 +19,8 @@
 .char \[.i] \N'253'
 .char \[S ac] \N'222'
 .char \[s ac] \N'254'
+.\} \" using -Tlatin1
+.
 .\" Translate eight-bit input characters.
 .\" 0xA0
 .\" char160 (no-break space) is translated on input
diff --git a/tmac/latin9.tmac b/tmac/latin9.tmac
index bc805e8fa..1bedd45eb 100644
--- a/tmac/latin9.tmac
+++ b/tmac/latin9.tmac
@@ -2,6 +2,8 @@
 .\"
 .do nr *groff_latin9_tmac_C \n[.cp]
 .cp 0
+.
+.if '\*[.T]'latin1' \{\
 .\" Replace characters that ISO Latin-1 has but Latin-9 doesn't.
 .char \[Cs] \ \" space
 .char \[bb] \ \" space
@@ -21,6 +23,8 @@
 .char \[OE] \N'188'
 .char \[oe] \N'189'
 .char \[:Y] \N'190'
+.\} \" using -Tlatin1
+.
 .\" Translate eight-bit input characters.
 .\" 0xA0
 .\" char160 (no-break space) is translated on input



reply via email to

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