gbranden pushed a commit to branch master
in repository groff.

commit 6cdf4f0840e6d511c7d2bc210d8f84f26119adc9
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Wed Jun 4 04:19:17 2025 -0500

    [troff]: Clarify font-related error diagnostics.
    
    * src/roff/troff/node.cpp (mount_font_at_position, font_lookup_error):
      Clarify error diagnostics; distinguish problems with loading a font
      description (to mount it) from problems with _selecting_ a font.
---
 ChangeLog               | 7 +++++++
 src/roff/troff/node.cpp | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b703ed9c0..1dbbb3b71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-06-04  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       * src/roff/troff/node.cpp (mount_font_at_position)
+       (font_lookup_error): Clarify error diagnostics; distinguish
+       problems with loading a font description (to mount it) from
+       problems with _selecting_ a font.
+
 2025-06-04  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * src/devices/grotty/tty.cpp: Refactor and fix code style nits.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 5681829a7..28fd3c792 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6650,7 +6650,7 @@ static void mount_font_at_position()
            msg += string(" from file '") + external_name.contents()
              + string("'");
          msg += '\0';
-         error("cannot load font '%1'%2 for mounting",
+         error("cannot load font description '%1'%2 for mounting",
                internal_name.contents(), msg.contents());
        }
       }
@@ -6778,11 +6778,11 @@ static void font_lookup_error(font_lookup_info& finfo,
                              const char *msg)
 {
   if (finfo.requested_name)
-    error("cannot load font '%1' %2", finfo.requested_name, msg);
+    error("cannot select font '%1' %2", finfo.requested_name, msg);
   else if (finfo.position == FONT_NOT_MOUNTED)
-    error("cannot load font %1", msg); // don't report position `-1`
+    error("cannot select font %1", msg); // don't report position `-1`
   else
-    error("cannot load font at position %1 %2",
+    error("cannot select font at position %1 %2",
          finfo.requested_position, msg);
 }
 

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

Reply via email to