gbranden pushed a commit to branch master
in repository groff.

commit 214dd030fb43532152b227ea3b5aea0ed2c0b1f5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 4 09:03:41 2025 -0500

    src/roff/troff/node.cpp: Extend `font_info` class.
    
    I need this so I can implement a font mounting position dumper.
    
    * src/roff/troff/node.cpp (class font_info): Declare new `get_font()`
      member function, returning pointer to contained `font` object.
    
      (font_info::get_font): Implement accessor member function.
---
 ChangeLog               | 10 ++++++++++
 src/roff/troff/node.cpp |  6 ++++++
 2 files changed, 16 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index e95bf7668..dd2ce26c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -165,6 +165,16 @@
        to `fn` to preƫmpt `-Wshadow` compiler warning with planned
        refactoring of `class font`.
 
+2025-06-04  G. Branden Robinson <[email protected]>
+
+       [troff]: Extend `font_info` class.  I need this so I can
+       implement a font mounting position dumper.
+
+       * src/roff/troff/node.cpp (class font_info): Declare new
+       `get_font()` member function, returning pointer to contained
+       `font` object.
+       (font_info::get_font): Implement accessor member function.
+
 2025-06-04  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/node.cpp (mount_font_no_translate): Clarify
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index a6bb1ff87..8cb37303e 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -176,6 +176,7 @@ public:
   int is_style();
   void set_zoom(int);
   int get_zoom();
+  font *get_font() const;
   friend symbol get_font_name(int, environment *);
   friend symbol get_style_name(int);
 };
@@ -279,6 +280,11 @@ inline int font_info::get_zoom()
   return fm->get_zoom();
 }
 
+font *font_info::get_font() const
+{
+  return fm;
+}
+
 tfont *make_tfont(tfont_spec &spec)
 {
   for (tfont *p = tfont::tfont_list; p != 0 /* nullptr */; p = p->next)

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

Reply via email to