gbranden pushed a commit to branch master
in repository groff.

commit 2af42d469405e62e8e8fa099124df033e3697875
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Tue Jul 8 13:43:17 2025 -0500

    [troff]: Tweak `pev` request output.
    
    * src/roff/troff/env.cpp (environment::print_env): Tweak output;
      describe current and previous font selections as "resolved", since if
      the font position of an abstract style is selected, that's not what
      shows up here, because the abstract style is combined with the default
      family.
---
 ChangeLog              |  8 ++++++++
 src/roff/troff/env.cpp | 10 +++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 86fd3a484..1b9984bf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-07-08  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       * src/roff/troff/env.cpp (environment::print_env): Tweak output;
+       describe current and previous font selections as "resolved",
+       since if the font position of an abstract style is selected,
+       that's not what shows up here, because the abstract style is
+       combined with the default family.
+
 2025-07-06  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        [eqn]: Fix Savannah #67285.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 87b802ca0..4d49d455d 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3490,8 +3490,8 @@ const char *environment::get_requested_point_size_string()
 
 void environment::print_env()
 {
-  // at the time of calling .pev, those values are always zero or
-  // meaningless:
+  // At the time this request is invoked, the following values are zero
+  // or meaningless.
   //
   //   char_height, char_slant,
   //   line_interrupted
@@ -3513,9 +3513,9 @@ void environment::print_env()
             prev_family->nm.contents());
     errprint("  default family: '%1'\n", family->nm.contents());
   }
-  errprint("  previous font selection: %1 ('%2')\n", prev_fontno,
-          get_font_name(prev_fontno, this).contents());
-  errprint("  font selection: %1 ('%2')\n", fontno,
+  errprint("  previous resolved font selection: %1 ('%2')\n",
+          prev_fontno, get_font_name(prev_fontno, this).contents());
+  errprint("  resolved font selection: %1 ('%2')\n", fontno,
           get_font_name(fontno, this).contents());
   errprint("  space size: %1/12 of font space width\n", space_size);
   errprint("  sentence space size: %1/12 of font space width\n",

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to