Hi Bjarni, At 2025-07-06T02:06:51+0000, Bjarni Ingi Gislason wrote: > Changing some lines in "src/roff/troff/env.cpp": > > // : fabs(dsd / warn_scale), > : fabs((dsd * 2) / curenv->get_requested_point_size()), > // in_nroff_mode ? 'n' : warn_scaling_unit); > in_nroff_mode ? 'n' : 'n'); > > can report the overset with an en unit
Yes. But how do you know how big an en is at that point in the document? Example: $diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp index 766ce6a96..26cf726f7 100644 --- a/src/roff/troff/env.cpp +++ b/src/roff/troff/env.cpp @@ -2292,7 +2292,7 @@ void environment::possibly_break_line(bool must_break_here, in_nroff_mode ? static_cast<int>(ceil(fabs(dsd / hresolution))) : fabs(dsd / warn_scale), - in_nroff_mode ? 'n' : warn_scaling_unit); + 'n'); // Hi, Bjarni } // An underset line warns only if it requires adjustment but no // adjustable spaces exist on the line. $ make -C build troff make: Entering directory '/home/branden/src/GIT/groff/build' CXX src/roff/troff/env.o CXXLD troff make: Leaving directory '/home/branden/src/GIT/groff/build' $ cat ATTIC/how-big-is-an-en.groff .ll 1.5i \l'\n[.l]u' .br \%abcdefghijklmnopqrstuvwx .sp 2i .ps 72 \%abcd .br .ps \l'\n[.l]u' $ ./build/test-groff ATTIC/how-big-is-an-en.groff >| ATTIC/how-big-is-an-en.ps troff:ATTIC/how-big-is-an-en.groff:4: warning [page 1, 0.2i]: cannot adjust line; overset by 0.0276389n troff:ATTIC/how-big-is-an-en.groff:7: warning [page 1, 2.3i]: cannot adjust line; overset by 0.388n 0.388n doesn't sound too bad, right? Exhibit attached. Regards, Branden
how-big-is-an-en.ps
Description: PostScript document
signature.asc
Description: PGP signature