groff-commit
[Top][All Lists]
Advanced

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

[groff] 09/11: [gpinyin]: Fix erroneous case folding of "Ü".


From: G. Branden Robinson
Subject: [groff] 09/11: [gpinyin]: Fix erroneous case folding of "Ü".
Date: Mon, 10 May 2021 08:49:03 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit a475f646d1458025666ac8aeedbd43ddb2017635
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon May 10 06:55:55 2021 +1000

    [gpinyin]: Fix erroneous case folding of "Ü".
    
    * contrib/gpinyin/subs.pl (vowel_t): Fix incorrect rendering of base
      glyph 'U', which was being forced to lowercase when a dieresis and
      tone mark were both being applied.  This caused the tone mark to
      overlap the dieresis, so decrease the font size of the base glyph even
      more to compensate.  The result is ugly but comprehensible.
    
    See <https://savannah.gnu.org/bugs/?57524>, partially mitigated but not
    completely resolved.
---
 contrib/gpinyin/ChangeLog | 12 ++++++++++++
 contrib/gpinyin/subs.pl   | 11 +++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/contrib/gpinyin/ChangeLog b/contrib/gpinyin/ChangeLog
index e880575..1db5368 100644
--- a/contrib/gpinyin/ChangeLog
+++ b/contrib/gpinyin/ChangeLog
@@ -1,3 +1,15 @@
+2021-05-10  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * contrib/gpinyin/subs.pl (vowel_t): Fix incorrect rendering of
+       base glyph 'U', which was being forced to lowercase when a
+       dieresis and tone mark were both being applied.  This caused the
+       tone mark to overlap the dieresis, so decrease the font size of
+       the base glyph even more to compensate.  The result is ugly but
+       comprehensible.
+
+       See <https://savannah.gnu.org/bugs/?57524>, partially mitigated
+       but not completely resolved.
+
 2021-05-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * contrib/gpinyin/subs.pl (%tones1_Unicode): Fix copy and paste
diff --git a/contrib/gpinyin/subs.pl b/contrib/gpinyin/subs.pl
index eda087b..3fa0acc 100755
--- a/contrib/gpinyin/subs.pl
+++ b/contrib/gpinyin/subs.pl
@@ -525,8 +525,15 @@ sub vowel_t {      # named glyphs for troff
 
   # \o'\s-2\[:u]\s0\[a-]'
   if ( $vowel =~ /[üÜ]/ ) {
-    my $smaller = 2;
-    $vowel = q(\\o'\\s-) . $smaller . q(\\[:u]\\s0) .
+    my $ue, $smaller;
+    if ($vowel eq 'ü') {
+      $ue = q(\\[:u]);
+      $smaller = 2;
+    } else {
+      $ue = q(\\[:U]);
+      $smaller = 4;
+    }
+    $vowel = q(\\o'\\s-) . $smaller . $ue . q(\\s0) .
       $accents[$tone] . q(');
     return $vowel;
   }



reply via email to

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