gbranden pushed a commit to branch master
in repository groff.
commit 166ff2e02b80af29ad45af362f1cce487e093408
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 11 19:08:11 2025 -0500
[tbl]: Fix Savannah #67420 (boxed utf8 TH tables).
* src/preproc/tbl/table.cpp (table::print_single_hrule): When drawing a
horizontal rule in a boxed table, also draw vertical rules at the
table edges in nroff mode such that grotty(1) correctly detects
horizontal and vertical rule intersections, producing correct
box-drawing glyphs on the "utf8" device.
Fixes <https://savannah.gnu.org/bugs/?67420>. This bug could be
characterized as an incomplete feature requiring cooperation between tbl
and grotty. One could date the problem back to the introduction of
"utf8" output device support in January 2000 (released in groff 1.16,
May 2000), or the addition of Unicode box-drawing character support to
represent rule intersections in grotty in July 2003 (released in groff
1.19.1, May 2004).
---
ChangeLog | 16 ++++++++++++++++
src/preproc/tbl/table.cpp | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 67dbfc990..84213a03e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2025-08-11 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/table.cpp (table::print_single_hrule): When
+ drawing a horizontal rule in a boxed table, also draw vertical
+ rules at the table edges in nroff mode such that grotty(1)
+ correctly detects horizontal and vertical rule intersections,
+ producing correct box-drawing glyphs on the "utf8" device.
+
+ Fixes <https://savannah.gnu.org/bugs/?67420>. This bug could be
+ characterized as an incomplete feature requiring cooperation
+ between tbl and grotty. One could date the problem back to the
+ introduction of "utf8" output device support in January 2000
+ {released in groff 1.16, May 2000}, or the addition of Unicode
+ box-drawing character support to represent rule intersections in
+ grotty in July 2003 (released in groff 1.19.1, May 2004).
+
2025-08-11 G. Branden Robinson <[email protected]>
* src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh:
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index e19c921fe..8e89eb0e6 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -2557,6 +2557,8 @@ void table::print_single_hrule(int r)
prints(".if t "
"\\v'" BODY_DEPTH "'"
"\\s[\\n[" LINESIZE_REG "]]\\c\n");
+ if ((r > 0) && (flags & (BOX | DOUBLEBOX | ALLBOX)))
+ prints(".if n \\Z@\\r\\D'l 0 2v'@\\c\n");
if (r > nrows - 1)
prints("\\D'l |\\n[TW]u 0'\\c");
else {
@@ -2591,6 +2593,8 @@ void table::print_single_hrule(int r)
}
}
prints("\\c\n");
+ if ((r > 0) && (flags & (BOX | DOUBLEBOX | ALLBOX)))
+ prints(".if n \\Z@\\r\\D'l 0 2v'@\\c\n");
prints(".ie t \\s0\n"
".el \\&\n");
prints(".ls\n"
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit