groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: tmac/ps.tmac: Fallback to hyphen-minus for U+2011.


From: G. Branden Robinson
Subject: [groff] 01/01: tmac/ps.tmac: Fallback to hyphen-minus for U+2011.
Date: Sat, 15 Aug 2020 13:47:24 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 86b99bdbf58c8dd1a4036f4004a6d8518a5b8357
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Aug 16 03:38:21 2020 +1000

    tmac/ps.tmac: Fallback to hyphen-minus for U+2011.
    
    Prompted by discussion with Dave Kemper in Savannah #58390.
    
    The line-breaking logic in groff does not think the fallback is a
    hyphen.
    
    Tested with:
    
        .ds a a\[u2011]
        .nr b 100 -1
        .while \n+b \*a\c
        \# "can't adjust line"
    
    and:
    
        .ds a a-
        .nr b 100 -1
        .while \n+b \*a\c
        \# "can't break line"
---
 ChangeLog    | 6 ++++++
 tmac/ps.tmac | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 589dad7..89c87f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-16  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/ps.tmac: Define ordinary hyphen-minus as fallback
+       character for U+2011 (non-breaking hyphen).  Prompted by
+       discussion with Dave Kemper in Savannah #58390.
+
 2020-08-15  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        Fix hyphenation bug.  The UR/UE and MT/ME macros were much too
diff --git a/tmac/ps.tmac b/tmac/ps.tmac
index 1892876..860919e 100644
--- a/tmac/ps.tmac
+++ b/tmac/ps.tmac
@@ -28,6 +28,9 @@
 .
 .cflags 8 \[an]
 .
+\# non-breaking hyphen
+.fchar \[u2011] -
+.
 .char \[radicalex] \h'-\w'\[sr]'u'\[radicalex]\h'\w'\[sr]'u'
 .fchar \[sqrtex] \[radicalex]
 .char \[mo] \h'.08m'\[mo]\h'-.08m'



reply via email to

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