bugGNU roff - Bugs: bug #64579, deprecate driver-specific...

 
 

bug #64579: deprecate driver-specific `internalname` member variable

Submitter:  Dave <barx>
Submitted:  Mon 21 Aug 2023 11:09:29 PM UTC
   
 
Category:  General Severity:  1 - Wish
Item Group:  Feature change Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Mar 2024 11:48:47 PM UTC, comment #1: 

original submission:

> the other, much higher-profile, thing groff calls an "internal name".


...this other thing being one of the parameters to the .fp request.  But by the time I filed this in savannah, the terms "internal name" and "external name" had already been erased from groff user documentation by commit 9e52384a1.  (They may still be used in this context within the code.)

Despite this avenue of user confusion being closed off, renaming the "internalname" font file directive to something more descriptive of its purpose is still a good idea (and still challenging, its purpose varying from one output device to another).

Dave <barx>
Group Member
Mon 21 Aug 2023 11:09:29 PM UTC, original submission:  

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 `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.

Dave <barx>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-49f2.
    Corresponding source code