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:
+
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;
}