bug-groff
[Top][All Lists]
Advanced

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

[bug #57524] gpinyin: suboptimal rendering for syllable "lue3"


From: G. Branden Robinson
Subject: [bug #57524] gpinyin: suboptimal rendering for syllable "lue3"
Date: Sun, 9 May 2021 03:53:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #1, bug #57524 (project groff):

Bernd also case-folded the U dieresis down, always, while he was at it.

You know, I'm not even going to file a separate bug for this.

Here's my fix for that part of the problem.  Apologies if the Perl isn't
idiomatic; the only defense I can make for it is that I actually tested it.

I've never spent a lot of time in Perl.

This code base does not encourage me to start.


diff --git a/contrib/gpinyin/subs.pl b/contrib/gpinyin/subs.pl
index eda087bd..9eb1ed7c 100755
--- a/contrib/gpinyin/subs.pl
+++ b/contrib/gpinyin/subs.pl
@@ -525,8 +525,13 @@ sub vowel_t {      # named glyphs for troff
 
   # \o'\s-2\[:u]\s0\[a-]'
   if ( $vowel =~ /[üÜ]/ ) {
+    if ($vowel eq 'ü') {
+      $ue = q(\\[:u]);
+    } else {
+      $ue = q(\\[:U]);
+    }
     my $smaller = 2;
-    $vowel = q(\\o'\\s-) . $smaller . q(\\[:u]\\s0) .
+    $vowel = q(\\o'\\s-) . $smaller . $ue . q(\\s0) .
       $accents[$tone] . q(');
     return $vowel;
   }


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57524>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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