bugGNU roff - Bugs: bug #44235, provide a way to redefine an...

 
 

bug #44235: provide a way to redefine an existing symbol in a specific font

Submitter:  Dave <barx>
Submitted:  Fri 13 Feb 2015 06:36:00 AM UTC
   
 
Category:  Core 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 30 Nov 2024 09:37:01 PM UTC, comment #3: 

comment #2:

> But what if we want an even-farther-fallback for when even
> mounted special fonts come up dry?


If I understand correctly, this is exactly the situation that commit c5d6280f3 addressed.  As its log says, it implements "a true 'last-resort' method that only takes effect if all glyph searches fail, including those of special fonts."

That commit's solution is fairly simple:

.if !c \[u2717] .char \[u2717] X

This is used in man pages, which never switch font families.  But this is not a feasible general solution, where a document might switch between multiple font families, each with different glyph coverages.  The above test will check whether the character is currently available, but then clobber it globally, regardless of what glyphs subsequent fonts offer.

Dave <barx>
Group Member
Thu 22 Aug 2024 05:47:07 PM UTC, comment #2: 

Related closely enough to note here is Branden's observation in bug #63018:

     .schar c contents
                Define global fallback character c as contents.  As
                char, but a character defined with schar is located
                after the list of fonts declared with the .special
                request and before any mounted special fonts.

"before any mounted special fonts"

But what if we want an even-farther-fallback for when even mounted special fonts come up dry?

Dave <barx>
Group Member
Fri 03 Jun 2022 09:30:29 PM UTC, comment #1: 

This isn't one of the mission statement items, so I'm stripping the "UPGRADE:" prefix.

G. Branden Robinson <gbranden>
Group administrator
Fri 13 Feb 2015 06:36:00 AM UTC, original submission:  

When searching for a symbol, groff first checks whether the symbol has been defined with the .char request.  If not, it checks the current font.  Only if it is not in the current font does groff check other user-defined symbols.

Thus, while .char can override an existing symbol across all fonts, there is no way to override an existing symbol only in a specific font, because all other symbol rules are of lower precedence than checking the current font.

The mailing list thread beginning with http://lists.gnu.org/archive/html/groff/2015-02/msg00029.html contains examples of situations where this lack of functionality makes performing certain tasks ponderous.

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 gbranden (Posted a comment)
  • -email is unavailable- added by bgarrigues (Updated the item)
  • -email is unavailable- added by schwarze (Updated the item)
  • -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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-03 gbranden SummaryUPGRADE: provide a way to redefine an existing symbol in a specific font provide a way to redefine an existing symbol in a specific font
    2018-11-26 bgarrigues CategoryNone Core
    2018-02-16 schwarze Severity3 - Normal 1 - Wish
        Item GroupNone Feature change

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code