gbranden pushed a commit to branch master
in repository groff.
commit 9d56c408ed50ede99032ae14e7973cd11150c5bd
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Nov 24 16:41:53 2026 -0600
src/roff/troff/node.cpp: Extend `font_info` class.
* src/roff/troff/node.cpp (class font_info): Add `unresolved_position`
member variable to keep track of a requested typeface's corresponding
mounting position before resolution. This is to aid the forthcoming
font dumper request.
---
ChangeLog | 7 +++++++
src/roff/troff/node.cpp | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index f8400f72a..c5f62ba2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-11-24 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/node.cpp (class font_info): Extend `font_info`
+ class. Add `unresolved_position` member variable to keep track
+ of a requested typeface's corresponding mounting position before
+ resolution. This is to aid the forthcoming font dumper request.
+
2026-11-24 G. Branden Robinson <[email protected]>
* src/roff/troff/node.cpp (class font_info): Add font info
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 85a75f280..d830456fd 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -134,6 +134,9 @@ public:
struct font_lookup_info {
int position;
+ // The unresolved position is prior to translation and the combination
+ // of an abstract style with the default family, as applicable.
+ int unresolved_position;
int requested_position;
char *requested_name;
font_lookup_info();
@@ -7179,6 +7182,7 @@ static bool read_font_identifier(font_lookup_info *finfo)
warning(WARN_FONT, "no font mounted at position %1", mp);
return false;
}
+ finfo->unresolved_position = mp;
finfo->position = curenv->get_family()->resolve(mp);
}
else {
@@ -7189,6 +7193,7 @@ static bool read_font_identifier(font_lookup_info *finfo)
if (mount_font_at_position(s, mp))
finfo->position = mp;
}
+ finfo->unresolved_position = mp;
finfo->position = curenv->get_family()->resolve(mp);
}
return (finfo->position != FONT_NOT_MOUNTED);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit