groff-commit
[Top][All Lists]
Advanced

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

[groff] 07/23: tmac/s.tmac: Add italic correction support.


From: G. Branden Robinson
Subject: [groff] 07/23: tmac/s.tmac: Add italic correction support.
Date: Sat, 30 Jul 2022 14:53:43 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit b54049e46c032ef7d406f978e109390b6b5a4c2c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Jul 26 21:39:35 2022 -0500

    tmac/s.tmac: Add italic correction support.
    
    * tmac/s.tmac: Add italic correction support to `I` and `BI` macros.
      Call `par*define-font-macro` with newly recognized third argument
      indicating that italic corrections should be applied.
    
      (par*define-font-macro): Apply the corrections if directed.
---
 ChangeLog   |  8 ++++++++
 tmac/s.tmac | 14 ++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 28e602717..5ead95fbc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,14 @@
        greek characters only slant if the glyp is sourced from a
        special font, not if the regular font contains greek glyphs.
 
+2022-07-26  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/s.tmac: Add italic correction support to `I` and `BI`
+       macros.  Call `par*define-font-macro` with newly recognized
+       third argument indicating that italic corrections should be
+       applied.
+       (par*define-font-macro): Apply the corrections if directed.
+
 2022-07-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/input.cpp (input_char_description): Clear
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 11f507111..15df9dc81 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1572,21 +1572,27 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .if \En[.$] .@warning arguments to .LG ignored
 .ps +2
 ..
-.\" par*define-font-macro macro font
+.\" par*define-font-macro macro font apply-italic-corrections
 .de par*define-font-macro
 .de \\$1
+.ds par*lic \" empty
+.ds par*ic \" empty
+.if \\n[.$]>2 \{\
+.      as par*lic \,\"
+.      as par*ic \/\"
+.\}
 .if \En[.$]>3 .@warning excess arguments to .\\$1 ignored
 .ie \En[.$] \{\
 .      nr par*prev-font \En[.f]
-\&\E$3\f[\\$2]\E$1\f[\En[par*prev-font]]\E$2
+\&\E$3\E*[par*lic]\f[\\$2]\E$1\f[\En[par*prev-font]]\E*[par*ic]\E$2
 .\}
 .el .ft \\$2
 \\..
 ..
 .par*define-font-macro R R
 .par*define-font-macro B B
-.par*define-font-macro I I
-.par*define-font-macro BI BI
+.par*define-font-macro I I yes
+.par*define-font-macro BI BI yes
 .ie n .par*define-font-macro CW R
 .el   .par*define-font-macro CW CR
 .\" underline a word



reply via email to

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