components/groff/patches/grotty-tty.cpp.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Mon, 20 Jul 2015 01:38:31 -0700
branchs11-update
changeset 4676 60d2b233e6cc
parent 3706 bd45826ad92c
permissions -rw-r--r--
20912751 problem in LIBRARY/LIBXML

Fix for disabling Unicode Box Drawing character (CR #18159500).

This fix is not integrated into the groff git repository upstream yet,
but has been passed upstream.

--- groff-1.22.2/src/devices/grotty/tty.cpp.orig	2014-02-03 05:20:27.696842116 -0800
+++ groff-1.22.2/src/devices/grotty/tty.cpp	2014-02-03 05:26:26.723872248 -0800
@@ -275,10 +275,17 @@
 
 tty_printer::tty_printer() : cached_v(0)
 {
+#if 0
+  // Disable Unicode Box Drawing character because width definition
+  // of this area is ambiguous so some fonts has half width but some
+  // fonts has full width. See the following link for more details:
+  // http://unicode.org/reports/tr11/
+
   if (font::is_unicode) {
     hline_char = 0x2500;
     vline_char = 0x2502;
   }
+#endif
   schar dummy;
   // black, white
   (void)tty_color(0, 0, 0, &dummy, 0);
@@ -652,6 +659,9 @@
   }
 }
 
+#if 0
+// Disable Unicode Box Drawing character
+
 // The possible Unicode combinations for crossing characters.
 //
 // `  ' = 0, ` -' = 4, `- ' = 8, `--' = 12,
@@ -665,6 +675,7 @@
   0x2574, 0x2510, 0x2518, 0x2524,
   0x2500, 0x252C, 0x2534, 0x253C
 };
+#endif
 
 void tty_printer::end_page(int page_length)
 {
@@ -713,11 +724,15 @@
       if (nextp && p->hpos == nextp->hpos) {
 	if (p->draw_mode() == HDRAW_MODE &&
 	    nextp->draw_mode() == VDRAW_MODE) {
+
+#if 0
+          // Disable Unicode Box Drawing character
 	  if (font::is_unicode)
 	    nextp->code =
 	      crossings[((p->mode & (START_LINE|END_LINE)) >> 4)
 			+ ((nextp->mode & (START_LINE|END_LINE)) >> 6)];
 	  else
+#endif
 	    nextp->code = '+';
 	  continue;
 	}