Article View: comp.text
Article #135font families (was GNU troff)
From: Dick Dunn
Date: Sat, 24 Jun 1989 00:06
Date: Sat, 24 Jun 1989 00:06
41 lines
2347 bytes
2347 bytes
In article <159@unmvax.unm.edu>, brainerd@unmvax.unm.edu (Walt Brainerd) writes:
. . .[stuff deleted]
> A feature we have not implemented, but think desirable is font families,
> so that switching to _italic_ means italic of the current font family,
> for example.
Could you elaborate? Why is this hard, or more to the point, why does it
take a mod to troff? Seems that what you want is a command to set a new
font family by some name selection; it needs to do some .fp's to get the
new fonts mounted where they belong (perhaps in all environments, depending
on what you think it should mean). This ought to be easy with a macro.
I've done it the lazy way, as in:
.de FF \" set font family (hides naming ugliness)
.if '\\$1'T' .F} R I B BI
.if '\\$1'H' .F} H HO HB HD
.if '\\$1'P' .F} PA PI PB PX
.if '\\$1'NC' .F} nc nC Nc NC
etc.--these are the TranScript name conventions. Yes, I should read the
stuff from a file instead of hard-wiring it...but this is enough to
illustrate. The .F} is just a helper:
.de F}
.fp 1 \\$1
.fp 2 \\$2
.fp 3 \\$3
.fp 4 \\$4
..
Now, at this point you switch using \f1 through \f4, as the macro packages
do internally. There's one more thing to help smooth this over--I define
some strings like:
.ds i \f2
.ds p \fP
(the latter just for consistency) so that instead of \fIitalic\fP, which
doesn't do what you want, or \f2italic\fP, which is obscure ("2" is not
really a mnemonic for "italic" to most of the world), you would write
\*iitalic\*p.
The one thing you really *don't* want to do is make \fI or .ft I change to
italic of the current font family--that's a change to troff semantics.
--
Dick Dunn UUCP: {ncar,nbires}!ico!rcd (303)449-2870
...Lately it occurs to me what a long, strange trip it's been.
Technical Details
Message-ID:
<15877@vail.ICO.ISC.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!iuvax!uxc.cso.uiuc.edu!tank!ncar!ico!vail!rcdReferences:
<779@pcrat.UUCP> <355@wjh12.harvard.edu> <8388@killer.DALLAS.TX.US> <159@unmvax.unm.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!iuvax!uxc.cso.uiuc.edu!tank!ncar!ico!vail!rcd From: rcd@ico.ISC.COM (Dick Dunn) Newsgroups: comp.text Subject: font families (was GNU troff) Summary: why does this need a troff change? Message-ID: <15877@vail.ICO.ISC.COM> Date: 24 Jun 89 00:06:13 GMT References: <779@pcrat.UUCP> <355@wjh12.harvard.edu> <8388@killer.DALLAS.TX.US> <159@unmvax.unm.edu> Distribution: comp Organization: Interactive Systems Corp, Boulder, CO Lines: 41