gbranden pushed a commit to branch master
in repository groff.

commit e77aa80266c98cc484c09a0cb9aaee8c0f34f607
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Apr 13 09:05:43 2026 -0500

    [troff]: Trivially refactor.
    
    Rename `is_font_name()` to `is_font_mounted()`.
    
    * src/roff/troff/node.h: Update declaration.
    
    * src/roff/troff/node.cpp (is_font_name): Rename this...
      (is_font_mounted): ...to this.
    
    * src/roff/troff/input.cpp (is_conditional_expression_true): Update call
      site.
---
 ChangeLog                | 11 +++++++++++
 src/roff/troff/input.cpp |  2 +-
 src/roff/troff/node.cpp  |  4 ++--
 src/roff/troff/node.h    |  2 +-
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ca620425c..fd096d138 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-04-13  G. Branden Robinson <[email protected]>
+
+       [troff]: Trivially refactor.  Rename `is_font_name()` to
+       `is_font_available()`.
+
+       * src/roff/troff/node.h: Update declaration.
+       * src/roff/troff/node.cpp (is_font_name): Rename this...
+       (is_font_available): ...to this.
+       * src/roff/troff/input.cpp (is_conditional_expression_true):
+       Update call site.
+
 2026-04-13  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/node.cpp: Trivially refactor.  Rename
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 56154c818..7aa5391c0 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -7322,7 +7322,7 @@ static bool is_conditional_expression_true()
       skip_branch();
       return false;
     }
-    result = is_font_name(curenv->get_family()->nm, nm);
+    result = is_font_available(curenv->get_family()->nm, nm);
   }
   else if (c == 'S') {
     tok.next();
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index fd7222dda..5ec540b70 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6743,8 +6743,8 @@ bool mount_font(int n, symbol name, symbol external_name)
                                                        n);
 }
 
-// True for abstract styles and resolved font names.
-bool is_font_name(symbol fam, symbol name)
+// Is `name` in family `fam` mounted or available for mounting?
+bool is_font_available(symbol fam, symbol name)
 {
   if (is_abstract_style(name))
     name = concat(fam, name);
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index da9886bd9..25567127f 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -704,7 +704,7 @@ inline hyphen_list::hyphen_list(unsigned char code, 
hyphen_list *p)
 extern void read_desc();
 extern bool mount_font(int, symbol,
                       symbol /* external_name */ = NULL_SYMBOL);
-extern bool is_font_name(symbol, symbol);
+extern bool is_font_available(symbol /* family */, symbol /* name */);
 extern bool is_abstract_style(symbol);
 extern bool mount_style(int, symbol);
 extern bool is_valid_font_mounting_position(int);

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

Reply via email to