gbranden pushed a commit to branch master
in repository groff.

commit 2e0945d415d89bada8113e1446cd69f9dad2f69a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 2 00:56:29 2026 -0600

    [troff]: `pev` reports modified glyph ht/slant.
    
    * src/roff/troff/env.cpp (environment::dump): Report values of modified
      glyph height and slant, as applicable.
    
    Fixes <https://savannah.gnu.org/bugs/?68872>.
    
    NEWS: Add item.
---
 ChangeLog              |  7 +++++++
 NEWS                   |  5 +++--
 src/roff/troff/env.cpp | 12 ++++++++++--
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3e4ea0f41..1cd3222e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-11-02  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp (environment::dump): Report values of
+       modified glyph height and slant, as applicable.
+
+       Fixes <https://savannah.gnu.org/bugs/?68872>.
+
 2026-11-01  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (char_as_unicode_buf): New `static`
diff --git a/NEWS b/NEWS
index d1e760397..69dcba139 100644
--- a/NEWS
+++ b/NEWS
@@ -27,8 +27,9 @@ troff
    saved by the most recent `sv` request, if it has not yet been output
    with the `os` request.
 
-*  The `pev` request now reports the environment's selected control and
-   no-break control characters.
+*  The `pev` request now reports the environment's modified glyph height
+   and slant, as applicable; and its selected control and no-break
+   control characters.
 
 *  The formatter now emits a warning in category "style" if -crementing
    interpolation (such as `\n+[myreg]` or `\n-[count]`) is (uselessly)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 0d0edebca..6dd51c83b 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3639,8 +3639,8 @@ void environment::dump()
   // At the time this request is invoked, the following values are zero
   // or meaningless.
   //
-  //   char_height, char_slant,
-  //   was_line_interrupted
+  //   was_line_interrupted (we report whether the _previous_ line was)
+  //
   //   current_tab, tab_width, tab_distance
   //   has_current_field, field_distance, pre_field_width, field_spaces,
   //     tab_field_spaces, tab_precedes_field
@@ -3663,6 +3663,14 @@ void environment::dump()
           prev_fontno, get_font_name(prev_fontno, this).contents());
   errprint("  resolved font selection: %1 ('%2')\n", fontno,
           get_font_name(fontno, this).contents());
+  errprint("  modified glyph height: %1s", char_height);
+  if (0 == char_height)
+    errprint(" (unmodified)");
+  errprint("\n");
+  errprint("  modified glyph slant: %1 degrees", char_slant);
+  if (0 == char_slant)
+    errprint(" (unmodified)");
+  errprint("\n");
   errprint("  minimum inter-word space size:"
           " %1/12 of font space width\n", space_size);
   errprint("  supplemental inter-sentence space size:"

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to