🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6725

Re: Changing fonts in ptroff

#6725
From: Bruce G Barnett
Date: Wed, 04 Nov 1987 14:25
183 lines
6051 bytes
In article <249@thirdi.UUCP> sarge@thirdi.UUCP (Sarge Gerbode) writes:
|I've been using ptroff with good success with my LaserWriter, but I haven't yet
|figured out how (if it can be done) one can change fonts (not just point size
|or italicization) in troff (or macro packages -- I use mm).

Since I just went through this exercise, I can answer some of your
questions on using fonts, troff, and transcript.

There is an option to ptroff for the font family (-F).
The default is Times Roman. You can also select Helvetica.
e.g.
	ptroff -FHelvetica [options]

The third - Courier - the constant width font, can be built
by going into /usr/local/lib/ps/troff.fonts:

Step 1 - make the file Courier.head (included)
Step 2 - Make the file Courier.map by copying Helvetica.map and applying
	the patches given. (included)
Step 3 - Patch the make file (included)
Step 4 - touch (create) the file Courier.ct (needed for make)
Step 5 - type 'make install'

- You should be able to use the Courier font.
e.g.
	ptroff -FCourier

If you want to mix font families, you can fool old troff by
creating a new Family.head - that has a special combination
of Courier, Time-Roman, and/or Helvetica on font positions
1, 2 and 3.

Go through the same procedure as in Courier, and patch the appropriate
entries.
--------------
Courier.head:
----------------------------------------------
.fp 1 C
.fp 2 CI
.fp 3 CB
.fp 4 S
.lg 0
--------------------------------------------------

Note the line to disable ligatures. (.lg 0 )

Here is the diff between the old and new makefile:
*** Makefile~	Thu Sep 10 12:34:26 1987
--- Makefile	Wed Sep 16 11:07:19 1987
***************
*** 14,20
  #######################################################################
  # Here are the family names, the face names are gotten from the .map files
  
! FAMILIES = Times.ct Helvetica.ct
  
  #######################################################################
  

--- 14,20 -----
  #######################################################################
  # Here are the family names, the face names are gotten from the .map files
  
! FAMILIES = Times.ct Helvetica.ct Courier.ct
  
  #######################################################################
-----------------------------------------------------------------  
You also need a Courier.map.
Here is the diff between Helvetica.map and Courier.map

*** Helvetica.map	Thu Sep 10 12:34:26 1987
--- Courier.map	Wed Nov  4 09:16:01 1987
***************
*** 1,4
! % lib/troff.font/Helvetica.map
  % Copyright (c) 1985 Adobe Systems Incorporated
  % RCSID: $Header: Helvetica.map,v 2.1 85/11/24 12:22:48 shore Rel $
  %

--- 1,4 -----
! % lib/troff.font/Courier.map
  % Copyright (c) 1985 Adobe Systems Incorporated
  % RCSID: $Header: Courier.map,v 2.1 85/11/24 12:22:48 shore Rel $
  %
***************
*** 1,6
  % lib/troff.font/Helvetica.map
  % Copyright (c) 1985 Adobe Systems Incorporated
! % RCSID: $Header: Helvetica.map,v 2.1 85/11/24 12:22:48 shore Rel $
  %
  % Font correspondence mapping for Troff and PostScript Helvetica family.
  %

--- 1,6 -----
  % lib/troff.font/Courier.map
  % Copyright (c) 1985 Adobe Systems Incorporated
! % RCSID: $Header: Courier.map,v 2.1 85/11/24 12:22:48 shore Rel $
  %
  % Font correspondence mapping for Troff and PostScript Courier family.
  %
***************
*** 2,8
  % Copyright (c) 1985 Adobe Systems Incorporated
  % RCSID: $Header: Helvetica.map,v 2.1 85/11/24 12:22:48 shore Rel $
  %
! % Font correspondence mapping for Troff and PostScript Helvetica family.
  %
  % PostScript and TranScript are trademarks of Adobe Systems Incorporated
  % Times and Helvetica are registered trademarks of Allied Corporation.

--- 2,8 -----
  % Copyright (c) 1985 Adobe Systems Incorporated
  % RCSID: $Header: Courier.map,v 2.1 85/11/24 12:22:48 shore Rel $
  %
! % Font correspondence mapping for Troff and PostScript Courier family.
  %
  % PostScript and TranScript are trademarks of Adobe Systems Incorporated
  % Times and Helvetica are registered trademarks of Allied Corporation.
***************
*** 32,38
  % generated that, when compiled, are used by troff as width
  % tables.
  
! % note that we will ignore HS and mount "S" when using troff!
  
  @FAMILYNAME Helvetica
  @FACENAMES H HI HB HS

--- 32,38 -----
  % generated that, when compiled, are used by troff as width
  % tables.
  
! % note that we will ignore CS and mount "S" when using troff!
  
  @FAMILYNAME Courier
  @FACENAMES C CI CB CS
***************
*** 34,41
  
  % note that we will ignore HS and mount "S" when using troff!
  
! @FAMILYNAME Helvetica
! @FACENAMES H HI HB HS
  
  @BEGINFONTS
  ROMAN=Helvetica

--- 34,41 -----
  
  % note that we will ignore CS and mount "S" when using troff!
  
! @FAMILYNAME Courier
! @FACENAMES C CI CB CS
  
  @BEGINFONTS
  ROMAN=Courier
***************
*** 38,46
  @FACENAMES H HI HB HS
  
  @BEGINFONTS
! ROMAN=Helvetica
! ITALIC=Helvetica-Oblique
! BOLD=Helvetica-Bold
  SYMBOL=Symbol
  EXTRAS=Times-Roman
  @ENDFONTS

--- 38,46 -----
  @FACENAMES C CI CB CS
  
  @BEGINFONTS
! ROMAN=Courier
! ITALIC=Courier-Oblique
! BOLD=Courier-Bold
  SYMBOL=Symbol
  EXTRAS=Times-Roman
  @ENDFONTS


-- 
	Bruce G. Barnett 	<barnett@ge-crd.ARPA> <barnett@steinmetz.UUCP>
				uunet!steinmetz!barnett
Technical Details
Message-ID: <2903@vdsvax.steinmetz.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!steinmetz!vdsvax!barnett
References: <249@thirdi.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!steinmetz!vdsvax!barnett
From: barnett@vdsvax.steinmetz.UUCP (Bruce G Barnett)
Newsgroups: comp.lang.postscript,comp.text
Subject: Re: Changing fonts in ptroff
Message-ID: <2903@vdsvax.steinmetz.UUCP>
Date: Wed, 4-Nov-87 09:25:17 EST
Article-I.D.: vdsvax.2903
Posted: Wed Nov  4 09:25:17 1987
Date-Received: Sat, 7-Nov-87 11:18:52 EST
References: <249@thirdi.UUCP>
Reply-To: barnett@steinmetz.UUCP (Bruce G Barnett)
Organization: General Electric CRD, Schenectady, NY
Lines: 183
Keywords: fonts troff