(more) nroff questions on italics/underscore
Dick Dunn
rcd at opus.UUCP
Tue Oct 30 17:08:03 AEST 1984
(Anyone have experience with variable-width characters in nroff--a "poor
man's" proportional font?)
The parent article is mine, asking why nroff uses literal '_' for
underscoring for the underlined font. I actually have a slightly larger
problem here - not only does it use the literal character, but it assumes
that it has width t.Char (the value of "Char" in the header part of the
driving table). This has confounded my efforts to make any sort of non-
uniform character width, since the underlining is immediately thrown off.
[Example: Suppose I try to set up for a 12-pitch (NOT point) font--I would
set Char to INCH/12. However, say I wanted some characters to be half-width
(for the sake of illustration)--I would then set Char to INCH/24 and set
the widths of full-width characters to 2. However, the underscoring is
wired in to assume that _ and \b have width Char, so underscoring a full-
width character produces __\b\b before the character.]
I'm trying to figure out if I'm missing something in the way the tables
work, or if it's just a code fix that I ought to make. Ideas?
> I recently discovered that nroff underscores text (as when it's doing its
> "italic" font) with '_' followed by \b followed by the character. The
> thing that seems odd is that it uses, literally, '_'. It DOESN'T use the
> character given for '_' in the mapping table (in /usr/lib/term/tabxyzzy),
> nor does it use \(ru (rule) or \(ul (underrule)--the char constant is
> hardwired into the code.
>
> (This is on a 4.2 system, to the extent that might matter.)
>
> Any idea why it's done this way? In particular, any idea whether it was
> intentional or just lazy?
>
> --
> Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086
> ...Simpler is better.
*** REPLACE THIS LINE WITH YOUR MESSAGE ***
--
Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086
...Simpler is better.
More information about the Comp.unix.wizards
mailing list