Name Date Size #Lines LOC

..14-Feb-2021-

devpost/H23-Aug-2023-

MakefileH A D14-Feb-20212 KiB9141

READMEH A D14-Feb-20216 KiB140110

makedev.cH A D17-Apr-202310.4 KiB352237

README

1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22
23The devpost directory includes width tables for the entire LaserWriter Plus font
24set (and a few others). The width tables assume a resolution of 720 dpi (which
25isn't expected to match your printer's resolution) and by default are installed
26in /usr/lib/font/devpost. You can point troff there using the -Tpost option, while
27dpost goes there automatically. The width tables were generated on a PostScript
28printer using postio (with the -t option) and the files that you'll find in
29directory ../buildtables.
30
31The mapping from troff's one or two character font names to PostScript fonts is
32handled by definitions made near the start of file ../postscript/dpost.ps. troff
33characters not available in PostScript fonts are constructed using the files in
34./devpost/charlib. Characters that are assigned a code (ie. number in the fourth
35column) less than 32 are looked up (by dpost) in the charlib directory. A code
36of 1 implies the character definition comes in one piece, while anything else
37means the character may come in two pieces. The first part is downloaded once,
38while the second part (ie. the one that ends in .map) must be included every
39time the character is printed.
40
41Adding a new font file (for troff and dpost) can be time consuming, but isn't
42difficult. The steps you'll need to follow are outlined below:
43
44 1: Pick a one or two character font name for troff and dpost - no longer a
45    trivial task! To find out what two character font names are taken type,
46
47	cd devpost
48	ls -l ? ??
49
50    Any unused one or two character font name can be chosen. I've tried to choose
51    two character font names with the first character representing the font family
52    (eg. K for Bookman) and second (upper or lower case R, I, B, or X) indicating
53    the style.
54
55 2: Choose a unique internal name (ie. integer between 1 and 255). To find out
56    what internal names (ie. numbers) are already taken type,
57
58	cd devpost
59	grep internalname ? ?? | sort -n +1 -2
60
61    Any number not already used can be chosen. Consecutive numbering starting at
62    a fixed offset (like 128) might be a useful approach.
63
64 3: Build the width tables and install the ASCII files in ./devpost. Width tables
65    can be built by hand or you can use postio (with the -t option) and the stuff
66    in directory ../buildtables and have the printer generate the tables. Widths
67    (ie. numbers in column 2) are point size 10 widths assuming a resolution of
68    720 dpi. As an example if you wanted to find the width of character A in
69    Times-Roman you could send the following to a PostScript printer,
70
71	/Times-Roman findfont 100 scalefont setfont
72	(A) stringwidth pop ==
73
74    The fourth column in the width tables is the character code field and is only
75    used by dpost. It must be the code assigned to the character in the PostScript
76    font. For simple characters (like an a) it's just the ASCII code. Characters
77    that are assigned codes less than 32 (typically 1 or 2) are special and are
78    built up using files in devpost/charlib.
79
80 4: Any new special character names you've added to the width table must appear in
81    the charset portion of file devpost/DESC.
82
83 5: Add a mapping definition to ../postscript/dpost.ps. For example if you've
84    built a width table for font XR and the PostScript name is /ExtraFont-Roman
85    then add,
86
87	/XR /ExtraFont-Roman def
88
89    to the dpost prologue.
90
91 6: If you're system uses PDQs you'll need to build new PDQ font files. I've
92    included the PDQ version of makedev and font.mk includes a target called PDQ
93    that works on MHCC systems. Typing,
94
95	make -f font.mk PDQ
96
97    should work, provided you can execute the PDQFRONT program. The new binary
98    PDQ files initially go in directory PDQ/devpost and from there are installed
99    in /usr/lib/font/PDQ/devpost. If you don't know what PDQs are skip this stuff.
100
101 7: Build and install the new binary font files and dpost prologue by typing,
102
103	cd ..
104	make TARGETS='font postscript' install
105
106    Actually the install (as written above) installs everything in directory
107    ../postscript. Since all you need is the new version of dpost.ps the following
108    might be safer,
109
110	cd ..
111	make TARGETS=font install
112	cd postscript
113	cp dpost.ps /usr/lib/postscript/dpost.ps
114
115The devpostaps directory is new and the binary tables won't be built or installed
116unless you do it by hand. The tables are an attempt to make Linotronic output look
117something like APS-5 output, and won't be useful to most people. The only real
118application is for simple (perhaps one or two page) updates to larger documents
119that have already been formatted and printed on the APS-5. The following commands
120build and install the devpostaps tables,
121
122	make -f font.mk makedev
123	cd devpostaps
124	../makedev DESC ? ??
125	mkdir /usr/lib/font/devpostaps
126	cp *.out /usr/lib/font/devpostaps
127	cd charlib
128	mkdir /usr/lib/font/devpostaps/charlib
129	cp * /usr/lib/font/devpostaps/charlib
130
131The tables should only be used by dpost - troff files should be formatted with
132the -Taps option. In addition dpost must use level 2 encoding. A command line
133that forces dpost to do the best it can with APS files would be,
134
135	dpost -e2 -Tpostaps -C/usr/lib/postscript/aps.ps file >file.ps
136
137where aps.ps is additional PostScript code (pulled in using the -C option) that
138tunes the Courier, Times, and Helvetica fonts so they look more like APS fonts.
139
140