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 + + 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 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 ) * Wed Feb 09 2011 Fedora Release Engineering - 1.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild