bugGNU roff - Bugs: bug #64342, [afmtodit] Preserve AFM file's...

 
 

bug #64342: [afmtodit] Preserve AFM file's ItalicAngle value in font description file

Submitter:  Dave <barx>
Submitted:  Sat 24 Jun 2023 07:45:53 PM UTC
   
 
Category:  Utilities 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
   

Sat 24 Jun 2023 11:51:00 PM UTC, comment #1: 

original submission:

> the AFM file's ItalicAngle value should still be placed in the file,
> either in a comment or as a parameter to a new optional directive.


The intro of the Font Description File Format section of the Texinfo manual suggests a third possibility.  It says, "If a directive name is repeated, later entries in the file override previous ones."  So the file could contain two "slant" directives, with the user-specified one in the second so that it will be the one that takes effect.

This is my least favorite solution, as its purpose is opaque to the (human) reader without an explanatory comment, and if afmtodit is going to add a comment, it should be one containing the AFM-file value rather explaining a quirky directive overloading.

But I've come to think the best solution is to introduce a new directive, even though it'll be seldom used.  The advantage is that the value will be in a prescribed format, so that code can read and use it, such as in:

.pso ( grep ^realslant /path/font/file || grep ^slant /path/font/file ) | sed 's/^[[:alpha:]]*/.ds slant/'

(I'm not suggesting "realslant" as the new directive name, just using it here as an example.)

Dave <barx>
Group Member
Sat 24 Jun 2023 07:45:53 PM UTC, original submission:  

afmtodit(1) says:

"the slant ("angle") parameter in the font description file...is used by groff in the positioning of accents.  By default afmtodit uses the negative of the ItalicAngle specified in the AFM file; with true italic fonts it is sometimes desirable to use a slant that is less than this.  If you find that an italic font places accents over base glyphs too far to the right, use -a to give it a smaller slant."

This means that for any file generated using afmtodit's -a option, the value of ItalicAngle in the AFM file is preserved nowhere in the output.

But this value can be useful to document authors, for example if they need to use groff's \S to simulate an italic glyph and want its slant amount to match that of an existing italic or oblique font.

Thus, afmtodit should preserve this value somewhere.  If the command is invoked with -a, the "slant" directive must use the user-specified value, but the AFM file's ItalicAngle value should still be placed in the file, either in a comment or as a parameter to a new optional directive.

(The background info above originated in bug #57506.)

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.13-b921.
    Corresponding source code