2 % An example logo character. Building the PostScript program that prints
3 % your company logo is not addressed here; we assume you already have
4 % such a program, that it's relatively simple, and that it prints the
5 % logo by itself on a page. What you'll find here are instructions for
6 % converting that logo program into a character that can be accessed by
9 % Building a new charlib character involves some PostScript programming.
10 % We've tried to isolate parameters that you'll need to change (Xoffset,
11 % Yoffset, and Scaling), but we can't guarantee things will work properly
12 % with every logo program. PostScript is a complex language and subtle
13 % interactions between your logo program and what we've done here can
16 % Tuning the new character is an iterative process. You may want to adjust
17 % the size of the logo (via Scaling), it's position relative to adjacent
18 % characters and the baseline (Xoffset and Yoffset), and the distance troff
19 % moves after printing the character (width field in file ../S1). The steps
22 % 1: Create a simple troff test file for the new character. Something
36 % four logo characters: \(LH\(LH\(LH\(LH
38 % is sufficient. The test file can go anywhere.
40 % 2: Change into directory /usr/lib/font/devpost/charlib. All file
41 % pathnames will be relative to that directory.
43 % 3: Save a copy of the working LH logo file. Then replace LH with
44 % this file (i.e. LH.example). Changes described below should be
45 % be made in the new LH file (not in LH.example).
47 % 4: Your PostScript logo program will eventually replace whatever
48 % you find between the <<StartLogo>> and <<EndLogo>> comment lines
49 % in the PostScript build_LH procedure (below). What's there now
50 % prints an example logo that you can use until you understand the
53 % 5: Print your troff test file using (assuming your making changes
54 % in the devpost charlib directory),
56 % troff -Tpost testfile | dpost | lp ...
58 % 6: Adjust the logo positioning by changing the numbers assigned to
59 % Xoffset and Yoffset (below). Both are in units of 72 per inch.
60 % Positive offsets should move the logo to the right and up the
63 % 7: Adjust the logo size by changing the the number assigned to
64 % Scaling. Unitsize also controls scaling, but there's no good
65 % reason to change both Scaling and Unitsize.
67 % 8: Control the horizontal distance troff moves after printing the
68 % new LH character by changing the width (i.e. the number in the
69 % second column) assigned to LH in file ../S1. Character width
70 % adjustments should probably wait until you're satisfied with
71 % the Scaling set in step 7.
73 % 9: Back to step 5 until your satisfied with the output.
75 % The remaining steps are suggested but not required:
77 % 10: Delete PostScript comments in your new LH charlib file - comments
78 % start with % and go to the end of the line.
80 % 11: Update the width field assigned to LH in file ../shell.lib. The
81 % new width should reflect what's currently in your S1 font file.
83 % 12: Make a similiar set of changes in /usr/lib/font/devLatin1/charlib.
84 % You can use the devpost version of LH to devLatin1/charlib/LH,
85 % but changes to files devLatin1/S1 and devLatin1/shell.lib must be
89 /Logo_Dict 100 dict dup begin
90 /Xoffset 0 def % 72 dpi with positive to the right
91 /Yoffset 0 def % 72 dpi with positive up the page
92 /Scaling 1.0 def % adjust this number to change the size
93 /Unitsize 36 def % for point size scaling - leave it be
97 /build_LH { % don't bind this procedure
101 currentpoint translate
102 resolution 72 div dup scale
103 Xoffset Yoffset translate
104 Scaling Scaling scale
105 ptsize Unitsize div dup scale
107 %% Replace everything between the <<StartLogo>> and <<EndLogo>>
108 %% comment lines by the PostScript program that prints your
124 /Helvetica findfont 18 scalefont setfont