summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vcelak <jvcelak@redhat.com>2011-06-17 14:32:33 +0200
committerJan Vcelak <jvcelak@redhat.com>2011-06-17 15:27:14 +0200
commit0cfd1e9552777572fc915bb66b33302b6a8611ee (patch)
treef9fca9208ff5efa5a3d50a4d7fa30cfd851a1ec8
parent99e7d5210c085befae649640c149f5c51fd64435 (diff)
downloadgroff-0cfd1e9552777572fc915bb66b33302b6a8611ee.tar.gz
groff-0cfd1e9552777572fc915bb66b33302b6a8611ee.tar.xz
groff-0cfd1e9552777572fc915bb66b33302b6a8611ee.zip
fix: Japanese bold/underline text not displayed correctly
Resolves: #712904 Thanks To: Daiki Ueno <dueno@redhat.com>
-rw-r--r--groff-grotty-wc-no-sgr.patch58
-rw-r--r--groff.spec3
2 files changed, 61 insertions, 0 deletions
diff --git a/groff-grotty-wc-no-sgr.patch b/groff-grotty-wc-no-sgr.patch
new file mode 100644
index 0000000..920979c
--- /dev/null
+++ b/groff-grotty-wc-no-sgr.patch
@@ -0,0 +1,58 @@
+Fix handling of wide characters in no-SGR mode.
+
+Fixes: #712904 Japanese bold/underlined text not displayed correctly
+
+Patch from upstream CVS:
+
+2011-01-20 Colin Watson <cjwatson@debian.org>
+
+ Fix handling of wide characters in no-SGR mode.
+
+ * src/devices/grotty/tty.cpp (tty_printer::make_underline): Only
+ emit a single backspace in no-SGR mode. less (at least) backspaces
+ over a character at a time.
+ (tty_printer::make_bold): Likewise.
+
+Index: src/devices/grotty/tty.cpp
+===================================================================
+RCS file: /sources/groff/groff/src/devices/grotty/tty.cpp,v
+retrieving revision 1.23
+retrieving revision 1.24
+diff -u -r1.23 -r1.24
+--- a/src/devices/grotty/tty.cpp 13 Dec 2010 17:42:28 -0000 1.23
++++ b/src/devices/grotty/tty.cpp 20 Jan 2011 07:13:57 -0000 1.24
+@@ -1,6 +1,6 @@
+ // -*- C++ -*-
+-/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+- 2010
++/* Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006,
++ 2009-2011
+ Free Software Foundation, Inc.
+ Written by James Clark (jjc@jclark.com)
+
+@@ -311,11 +311,8 @@
+ if (!w)
+ warning("can't underline zero-width character");
+ else {
+- int n = w / font::hor;
+- for (int i = 0; i < n; i++)
+- putchar('_');
+- for (int j = 0; j < n; j++)
+- putchar('\b');
++ putchar('_');
++ putchar('\b');
+ }
+ }
+ else {
+@@ -337,10 +334,8 @@
+ if (!w)
+ warning("can't print zero-width character in bold");
+ else {
+- int n = w / font::hor;
+ put_char(c);
+- for (int i = 0; i < n; i++)
+- putchar('\b');
++ putchar('\b');
+ }
+ }
+ else {
diff --git a/groff.spec b/groff.spec
index d4c7e7c..b3fd060 100644
--- a/groff.spec
+++ b/groff.spec
@@ -14,6 +14,7 @@ Patch1: groff-info-missing-x11.patch
Patch2: groff-makefile-typo.patch
Patch3: groff-manpages-typos.patch
Patch4: groff-grofferdir-auto.patch
+Patch5: groff-grotty-wc-no-sgr.patch
Requires: mktemp
Requires: /sbin/install-info
@@ -82,6 +83,7 @@ language and documentation for creating PDF files.
%patch2 -p1 -b .makefile-typo
%patch3 -p1 -b .manpages-typos
%patch4 -p1 -b .grofferdir-auto
+%patch5 -p1 -b .grotty-wc-no-sgr
for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom} ; do
@@ -209,6 +211,7 @@ fi
* Fri Jun 17 2011 Jan Vcelak <jvcelak@redhat.com> 1.21-3
- fix #678572: groffer libdir is incorrect
- fix #709474: unowned groff doc dir
+- fix #712904: Japanese bold/underline text not displayed correctly (Daiki Ueno <dueno@redhat.com>)
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild