groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] redefining symbols on a per-font basis


From: Dave Kemper
Subject: [Groff] redefining symbols on a per-font basis
Date: Wed, 11 Feb 2015 13:05:59 -0600

Hi,

The "Using Symbols" section of the groff manual states:

   Here the exact rules how `gtroff' searches a given symbol:

   * If the symbol has been defined with the `char' request, use it.
     This hides a symbol with the same name in the current font.

   * Check the current font.

   * If the symbol has been defined with the `fchar' request, use it.

   * Check whether the current font has a font-specific list of special
     fonts; test all fonts in the order of appearance in the last
     `fspecial' call if appropriate.

   * If the symbol has been defined with the `fschar' request for the
     current font, use it.

Following this are a few more rules, of lower precedence than the five above.

But it seems there is a step missing between the first and second
rules above: Between checking .char definitions (which apply to all
fonts) and checking the current font, there should be a check for a
font-specific definition that overrides the symbol defined in that
font.

This omission makes it impossible to straightforwardly redefine select
symbols in select fonts.  (.fschar is meant as a font-specific symbol
definition, but it is only a fallback mechanism; it cannot hide a
symbol in the current font because it is not checked until after the
current font is checked.)

For instance, one might want to redefine italic parentheses to instead
output roman parentheses (as advised by Robert Bringhurst in his
"Elements of Typographic Style").  This would require mapping the
italic parentheses characters to roman, mapping the bold italic ones
to bold roman, and leaving the roman and bold ones alone.  There does
not appear to be any straightforward way to do this under the current
set of requests.

Am I missing something?  Is there a mechanism to override specific
symbols in specific fonts?

(As an aside, the first sentence of the manual excerpt quoted above is
missing a verb; it should probably read "Here are the exact rules...")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]