URL: <https://savannah.gnu.org/bugs/?64579>
Summary: deprecate driver-specific `internalname` member variable Group: GNU roff Submitter: barx Submitted: Mon 21 Aug 2023 06:09:29 PM CDT Category: General Severity: 1 - Wish Item Group: Feature change Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Mon 21 Aug 2023 06:09:29 PM CDT By: Dave <barx> Branden wrote the below in bug #61423. That bug's primary issue was addressed, but this was left as a future task. I'm reposting his words exactly, only updating one hyperlink to point to the current appropriate place in the relevant file. I'll leave it to Branden whether the "short term" and "longer term" tasks warrant separate bug reports; my own understanding of all this remains fuzzy. ---- [An] independent but important issue in my view is to deprecate that driver-specific `internalname` member variable as soon as possible in favor of some other name. The design of the font description file format suggests that a driver could pick any usefully descriptive name it wanted, however I don't think libgroff offers the font description as a general key/value store. This [https://git.savannah.gnu.org/cgit/groff.git/tree/src/libs/libgroff/font.cpp?id=70a683d6733713181b8f9ae25a8bfad133d5ba68#n1304 `FONT_COMMAND_HANDLER` business] appears to be the correct the mechanism, so that output drivers would extend the class and supply their own member functions, and grodvi, grolbp, grolj4, and grops all seem to have done so for other directive names. But this wasn't done for `internalname`. For some reason, the `internalname` member variable became an ersatz union--in other words, a junk box. In the short term I propose to rename the `internalname` and `get_internal_name` members of `font` to something else--almost _anything else_, even arrant nonsense, like "mxyzptlk", would be an improvement because at least then it would be impossible to infer identity with the other, much higher-profile, thing groff calls an "internal name". For compatibility with old font files, recognition of the `internalname` directive name would have to be retained. But we can use the new name going forward. Right now I don't have a better idea for a new name than "disambiguator" or "classifier", which are pretty weak...I challenge the reader to come up with a term that can encompass grodvi, grops, and grotty's usages (TFM file name, PostScript font name, bit mask). In the longer term, I guess the `FONT_COMMAND_HANDLER` thing should actually be exercised on the output driver side of things as seems to have been originally intended. Then the `font` class wouldn't need the `get_internal_name` member function at all. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64579> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/