1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <TITLE> |
---|
4 | The ttf2pt1 font installation guide |
---|
5 | </TITLE> |
---|
6 | </HEAD> |
---|
7 | <BODY> |
---|
8 | Sergey A. Babkin |
---|
9 | <br> |
---|
10 | <A HREF="mailto:babkin@users.sourceforge.net"> |
---|
11 | <babkin@bellatlantic.net></A> or <A HREF="mailto:sab123@hotmail.com"><sab123@hotmail.com></A> |
---|
12 | <p> |
---|
13 | <! |
---|
14 | (Do not edit this file, it is generated from FONTS.html!!!) |
---|
15 | > |
---|
16 | |
---|
17 | <!-- =defdoc cv ttf2pt1_convert 1 --> |
---|
18 | <!-- =defdoc gs ttf2pt1_x2gs 1 --> |
---|
19 | <H2> |
---|
20 | THE FONT INSTALLATION GUIDE |
---|
21 | <br> |
---|
22 | for the TTF to Type1 converter and fonts generated by it |
---|
23 | </H2> |
---|
24 | <! |
---|
25 | ======================================================== |
---|
26 | > |
---|
27 | |
---|
28 | There is historically a number of problems with the support of the 8-bit |
---|
29 | character encodings. This installation guide pays a lot of attention |
---|
30 | to the 8-bit issues, because these issues are responsible for the |
---|
31 | most of troubles during the installation of fonts. But they are |
---|
32 | not the only things covered in this guide, so it's worth reading |
---|
33 | even if all you need is plain ASCII. For convenience of reading |
---|
34 | I have marked the paragraphs dealing solely with 8-bit problems |
---|
35 | with characters <FONT COLOR="#3333FF"><FONT SIZE=-1>*8*</FONT></FONT>. |
---|
36 | <p> |
---|
37 | |
---|
38 | To simplify this installation the distribution package of the |
---|
39 | converter contains a number of scripts written in shell and |
---|
40 | Perl. So, to run them you will need a shell interpreter (Bourne-shell, |
---|
41 | POSIX-shell, Korn-shell are OK, ba-shell is probably also OK but not |
---|
42 | tested yet). The Perl scripts were tested with Perl5 but probably |
---|
43 | should work with Perl4 too. All the scripts are located in the |
---|
44 | `scripts' subdirectory. |
---|
45 | <p> |
---|
46 | |
---|
47 | This guide considers the following issues of installation of the |
---|
48 | fonts: |
---|
49 | <p> |
---|
50 | |
---|
51 | <b> |
---|
52 | <ul> |
---|
53 | <li> <A HREF="#X11">X11</A><br> |
---|
54 | <li> <A HREF="#gs">Ghostscript</A><br> |
---|
55 | <li> <A HREF="#win">MS Windows</A><br> |
---|
56 | <li> <A HREF="#netscape">Netscape Navigator/Communicator</A><br> |
---|
57 | <li> <A HREF="#rpm">Linux RPM package</A><br> |
---|
58 | <li> <A HREF="#framemaker">FrameMaker</A><br> |
---|
59 | <li> <A HREF="#soffice">StarOffice</A><br> |
---|
60 | </ul> |
---|
61 | </b><p> |
---|
62 | |
---|
63 | <A NAME="X11"></A> |
---|
64 | <H3> |
---|
65 | X11 |
---|
66 | </H3> |
---|
67 | <! |
---|
68 | === |
---|
69 | > |
---|
70 | |
---|
71 | <!-- =section cv NAME --> |
---|
72 | <!-- =text B<ttf2pt1_convert> - convenience font conversion script --> |
---|
73 | <!-- =stop --> |
---|
74 | To simplify the conversion a set of scripts is provided with <b>ttf2pt1</b>. |
---|
75 | They are collected in the `<TT>scripts</TT>' subdirectory. |
---|
76 | <p> |
---|
77 | |
---|
78 | <!-- =section cv DESCRIPTION --> |
---|
79 | `<b>Convert</b>' is the master conversion script provided with ttf2pt1. |
---|
80 | When installed into a public directory it's named `<b>ttf2pt1_convert</b>' |
---|
81 | to avoid name collisions with the other programs. |
---|
82 | <p> |
---|
83 | <!-- =stop --> |
---|
84 | |
---|
85 | It's called as: |
---|
86 | <p> |
---|
87 | |
---|
88 | <!-- =section cv SYNOPSIS --> |
---|
89 | <!-- =text ttf2pt1_convert B<[config-file]> --> |
---|
90 | <!-- =stop --> |
---|
91 | <blockquote> |
---|
92 | convert <i>[config-file]</i> |
---|
93 | </blockquote> |
---|
94 | |
---|
95 | <!-- =section cv DESCRIPTION --> |
---|
96 | If the configuration file is not specified as an argument then the file |
---|
97 | `<TT>convert.cfg</TT>' in the current directory is used. This file contains |
---|
98 | a set of configuration variables. The distribution contains a sample file |
---|
99 | file `<TT>convert.cfg.sample</TT>'. Please copy it to `<TT>convert.cfg</TT>', |
---|
100 | look inside it and change the configuration variables. The more stable |
---|
101 | configuration variables, such as the path names of the scripts and |
---|
102 | encoding files are located in `<TT>convert</TT>' itself, they are |
---|
103 | automatically updated when installing <b>ttf2pt1</b>. |
---|
104 | <p> |
---|
105 | |
---|
106 | Put all the TTF fonts you want to convert into some directory (this |
---|
107 | may be just the directory that already contains all the Windows |
---|
108 | fonts on a mounted FAT filesystem). If you have fonts in different |
---|
109 | source encoding then put the fonts in each of the encodings |
---|
110 | into a separate directory. Up to 10 source directories are |
---|
111 | supported. If you (in a rather unlikely case) have more source |
---|
112 | directories then you can make two separate runs of the converter, |
---|
113 | converting up to 10 directories at a time. |
---|
114 | <p> |
---|
115 | |
---|
116 | The variables in the configuration file are: |
---|
117 | <p> |
---|
118 | |
---|
119 | <!-- ==over 2 --> |
---|
120 | <!-- ==item * --> |
---|
121 | <B><tt>SRCDIRS</tt></B> - the list of directories (with absolute paths) with |
---|
122 | TTF fonts. Each line contains at least 3 fields: the name of the directory, |
---|
123 | the language of the fonts in it (if you have fonts for different |
---|
124 | languages you have to put them into the separate directories) and the |
---|
125 | encoding of the fonts. Again, if you have some of the TTF typefaces in |
---|
126 | one encoding, and some in another (say, CP-1251 and KOI-8), you have |
---|
127 | to put them into the separate source directories. Some lines may contain |
---|
128 | 4 fields. Then the fourth field is the name of the external map to |
---|
129 | convert the Unicode fonts into the desirable encoding. This map is |
---|
130 | used instead of the built-in map for the specified language. |
---|
131 | <p> |
---|
132 | |
---|
133 | <FONT COLOR="#3333FF"><FONT SIZE=-1>*8*</FONT></FONT> |
---|
134 | An interesting thing is that some languages have more than one |
---|
135 | widely used character encodings. For example, the widely used |
---|
136 | encodings for Russian are IBM CP-866 (MS-DOS and Unix), KOI-8 |
---|
137 | (Unix and VAX, also the standard Internet encoding), IBM CP-1251 (MS Windows). |
---|
138 | That's why I have provided the means to generate the converted fonts |
---|
139 | in more than one encoding. See the file <A HREF="encodings/README.html">encodings/README</A> for |
---|
140 | details about the encoding tables. Actually, if you plan to use |
---|
141 | these fonts with Netscape Navigator better use the aliases |
---|
142 | cp-866 instead of ibm-866 and windows-1251 instead of ibm-1251 |
---|
143 | because that's what Netscape wants. |
---|
144 | <p> |
---|
145 | |
---|
146 | <!-- ==item * --> |
---|
147 | <b><tt>DSTDIR</tt></b> - directory for the resulting Type1 fonts. Be careful! |
---|
148 | This directory gets completely wiped out before conversion, |
---|
149 | so don't use any already existing directory for this purpose. |
---|
150 | <p> |
---|
151 | |
---|
152 | <!-- ==item * --> |
---|
153 | <b><tt>DSTENC<i>{language}</i></tt></b> - the list of encodings in which the destination |
---|
154 | fonts will be generated for each language. Each font of that |
---|
155 | language will be generated in each of the specified |
---|
156 | encodings. If you don't want any translation, just specify both |
---|
157 | <tt>SRCENC</tt> and <tt>DSTENC</tt> as iso8859-1 (or if you want any other encoding |
---|
158 | specified in the fonts.dir, copy the description of 8859-1 with |
---|
159 | new name and use this new name for <tt>SRCENC</tt> and <tt>DSTENC</tt>). |
---|
160 | <p> |
---|
161 | |
---|
162 | <!-- ==item * --> |
---|
163 | <b><tt>FOUNDRY</tt></b> - the foundry name to be used in the fonts.dir file. I have |
---|
164 | set it to `fromttf' to avoid name conflicts with any existing font for |
---|
165 | sure. But this foundry name is not registered in X11 standards and |
---|
166 | if you want to get the full standard compliance or have a font server |
---|
167 | that enforces such a compliance, use `misc'. |
---|
168 | <p> |
---|
169 | <!-- ==back --> |
---|
170 | |
---|
171 | The next few parameters control the general behavior of the converter. |
---|
172 | They default values are set to something reasonable. |
---|
173 | <p> |
---|
174 | |
---|
175 | <!-- ==over 2 --> |
---|
176 | <!-- ==item * --> |
---|
177 | <b><tt>CORRECTWIDTH</tt></b> - if the value is set to <b><tt>YES</tt></b> then use the |
---|
178 | converter option <tt><b>-w</b></tt>, otherwise don't use it. See the description of |
---|
179 | this option in the <A HREF="README.html">README</A> file. |
---|
180 | <p> |
---|
181 | |
---|
182 | <!-- ==item * --> |
---|
183 | <b><tt>REMOVET1A</tt></b> - if the value is set to <b><tt>YES</tt></b> then after |
---|
184 | conversion remove the un-encoded <tt>.t1a</tt> font files and the |
---|
185 | intermediate <tt>.xpfa</tt> font metric files. |
---|
186 | <p> |
---|
187 | |
---|
188 | <!-- ==item * --> |
---|
189 | <b><tt>INSTALLFONTMAP</tt></b> - a Ghostscript parameter, if the value is set to |
---|
190 | <b><tt>YES</tt></b> then install the entries for the new fonts |
---|
191 | right into the main <tt>Fontmap</tt> file. Otherwise just leave |
---|
192 | the file <tt>Fontmap.ttf</tt> in the Ghostscript configuration |
---|
193 | directory. |
---|
194 | <p> |
---|
195 | |
---|
196 | <!-- ==item * --> |
---|
197 | <b><tt>HINTSUBST</tt></b> - if the value is set to <b><tt>YES</tt></b> use the option |
---|
198 | <tt><b>-H</b></tt>, otherwise don't use it. This option enables the |
---|
199 | hint substitution technique. If you have not installed the X11 patch |
---|
200 | described above, use this option with great caution. See further |
---|
201 | description of this option in the <A HREF="README.html">README</A> file. |
---|
202 | <p> |
---|
203 | |
---|
204 | <!-- ==item * --> |
---|
205 | <b><tt>ENFORCEISO</tt></b> - if the value is set to <b><tt>YES</tt></b> then |
---|
206 | disguise the resulting fonts as the fonts in ISOLatin1 encoding. Historically |
---|
207 | this was neccessary due to the way the installer scripts created the |
---|
208 | X11 font configuration files. It is not neccessary any more for this |
---|
209 | purpose. But if you plan to use these fonts with some other application |
---|
210 | that expects ISOLatin1 encoding then better enable this option. |
---|
211 | <p> |
---|
212 | |
---|
213 | <!-- ==item * --> |
---|
214 | <b><tt>ALLGLYPHS</tt></b> - if the value is set to <b><tt>YES</tt></b> then |
---|
215 | include all the glyphs from the source fonts into the resulting fonts, even |
---|
216 | if these glyphs are inaccessible. If it's set to <b><tt>NO</tt></b> then |
---|
217 | include only the glyphs which have codes assigned to them. The glyphs |
---|
218 | without codes can not be used directly. But some clever programs, |
---|
219 | such as the Type 1 library from XFree86 3.9 and higher can change |
---|
220 | the encoding on the fly and use another set of glyphs. If you have not |
---|
221 | installed the X11 patch described above, use this option with great |
---|
222 | caution. See further description of the option option <tt><b>-a</b></tt> in the |
---|
223 | <A HREF="README.html">README</A> file. |
---|
224 | <p> |
---|
225 | |
---|
226 | <!-- ==item * --> |
---|
227 | <b><tt>GENUID</tt></b> - if the value is set to <b><tt>YES</tt></b> then use |
---|
228 | the option <tt><b>-uA</b></tt> of the converter to generate UniqueIDs for |
---|
229 | the converted fonts. The standard X11 Type 1 library does not use |
---|
230 | this ID, so it may only be neccessary for the other applications. |
---|
231 | The script is clever enough to generate different UniqueID for the |
---|
232 | same font converted to multiple encodings. Also after conversion it |
---|
233 | checks all the fonts generacted during the session for duplicated |
---|
234 | UniqueID and shows those. Still, this does not quarantee that these |
---|
235 | UniqueIDs won't overlap with some other fonts. The UniqueIDs are |
---|
236 | generated as hash values from the font names, so it's guaranteed |
---|
237 | that if the `<tt>convert</tt>' script runs multiple times it will |
---|
238 | generate the same UniqueIDs during each run. See further description |
---|
239 | of this option in the <A HREF="README.html">README</A> file. |
---|
240 | <p> |
---|
241 | |
---|
242 | <!-- ==item * --> |
---|
243 | <b><tt>GENUID</tt></b> - if the value is set to <b><tt>YES</tt></b> then create |
---|
244 | the <tt>.pfb</tt> files, otherwise the <tt>.pfa</tt> files. The <tt>.pfb</tt> |
---|
245 | files are more compact but contain binary data, so you may experience some |
---|
246 | troubles when transferring them through the network. |
---|
247 | <p> |
---|
248 | <!-- ==back --> |
---|
249 | |
---|
250 | The following parameters are used to locate the other scripts and |
---|
251 | configuration files. By default the scripts do a bit of guessing for them: |
---|
252 | they search in the <b>ttf2pt1</b> installation directory if <b>ttf2pt1</b> |
---|
253 | was installed or otherwise suppose that you are running `<tt>convert</tt>' with |
---|
254 | `<tt>scripts</tt>' subdirectory being the current directory. |
---|
255 | <p> |
---|
256 | |
---|
257 | <!-- ==over 2 --> |
---|
258 | <!-- ==item * --> |
---|
259 | <b><tt>ENCDIR</tt></b> - directory containing the descriptions of encodings |
---|
260 | <br> |
---|
261 | <!-- ==item * --> |
---|
262 | <b><tt>MAPDIR</tt></b> - directory containing the external map files |
---|
263 | <p> |
---|
264 | <!-- ==back --> |
---|
265 | |
---|
266 | Besides that a few parameters are built into the `<tt>convert</tt>' script itself. |
---|
267 | You probably won't need to change them: |
---|
268 | <p> |
---|
269 | |
---|
270 | <!-- ==over 2 --> |
---|
271 | <!-- ==item * --> |
---|
272 | <tt><b>T1ASM</b></tt>, <tt><b>TTF2PT1</b></tt>, <tt><b>TRANS</b></tt>, <tt><b>T1FDIR</b></tt>, <tt><b>FORCEISO</b></tt> - paths to the other script |
---|
273 | <p> |
---|
274 | <!-- ==back --> |
---|
275 | |
---|
276 | Also there are a few parameters controlling the installation of |
---|
277 | fonts for Ghostscript. Please look at their description in the |
---|
278 | <A HREF="#gs">Ghostscript</a> section of documentation or in the <b>ttf2pt1_x2gs(1)</b> |
---|
279 | manual page before running `<tt>convert</tt>'. If these parameters are |
---|
280 | set, `<tt>convert</tt>' will call the `<tt>x2gs</tt>' script automatically |
---|
281 | to install the newly converted fonts in Ghostscript. |
---|
282 | <p> |
---|
283 | |
---|
284 | After creating the configuration file run the `<tt>convert</tt>' script. Look at |
---|
285 | the result and the log file in <tt>DSTDIR</tt>. |
---|
286 | <p> |
---|
287 | |
---|
288 | Add the directory with newly converted fonts to the configuration |
---|
289 | of X server or font server. For most of the systems this step is |
---|
290 | very straightforward. For HP-UX it's rather tricky and poorly |
---|
291 | documented, so the file <A HREF="FONTS.hpux.html">FONTS.hpux</A> gives a short description. |
---|
292 | <p> |
---|
293 | |
---|
294 | If you don't have the privileges of the root user, you still can |
---|
295 | configure your private font server. Just use some non-standard |
---|
296 | port number (see <A HREF="FONTS.hpux.html">FONTS.hpux</A> for an example, exept that you won't |
---|
297 | need all the HP-related stuff on any other system). |
---|
298 | <p> |
---|
299 | <!-- =stop --> |
---|
300 | |
---|
301 | <H4> |
---|
302 | Known Problems |
---|
303 | </H4> |
---|
304 | <! |
---|
305 | -------------- |
---|
306 | > |
---|
307 | <!-- =section cv BUGS --> |
---|
308 | <!-- ==head2 Known problems --> |
---|
309 | |
---|
310 | <ul> |
---|
311 | <li> One catch is that the X11 Type 1 font library has a rather low limit |
---|
312 | on the font size. Because of this the fonts with more complicated |
---|
313 | outlines and the enabled hint substitution may not fit into |
---|
314 | this limit. The same applies to the fonts with very complicated |
---|
315 | outlines or with very many glyphs (especially the fonts with |
---|
316 | over 256 glyphs). So you will need to excercise caution with |
---|
317 | these options if you plan using these fonts with X11. Some vendors |
---|
318 | such as HP provide the Type 1 implementation licensed from Adobe |
---|
319 | which should have no such problem. |
---|
320 | <p> |
---|
321 | |
---|
322 | But there is a solution even for the generic X11. A patch located |
---|
323 | in the subdirectory `<tt>app/X11</tt>' fixes this problem as well |
---|
324 | as some other minor problems. Its description is provided in |
---|
325 | <A HREF="app/X11/README.html">app/X11/README</A>. |
---|
326 | <p> |
---|
327 | |
---|
328 | To fix the X11 font library, you have to get the X11 sources. I |
---|
329 | can recommend the ftp sites of the XFree86 project <A HREF="ftp://ftp.xfree86.org">ftp://ftp.xfree86.org</A> |
---|
330 | or of the Open Group <A HREF="ftp://ftp.x.org">ftp://ftp.x.org</A>. This patch was made on the sources |
---|
331 | of XFree86 so you may have better success with applying it to the |
---|
332 | XFree86 distribution. After you have got the sources, make sure |
---|
333 | that you can compile them. Then apply the patch as described. |
---|
334 | Make sure that it was applied properly. Compile the sources again |
---|
335 | (actually, you need only the fonts library, the fonts server, and |
---|
336 | possibly the X server). It would be prudent now to save your old |
---|
337 | font library, font server and, possibly, X server. Then install |
---|
338 | the new recently compiled versions of these files. Of course, |
---|
339 | if you know someone who already has compiled these files for the |
---|
340 | same OS as yours, you can just copy the binary fles from him. |
---|
341 | <p> |
---|
342 | |
---|
343 | Alas, building the X11 system from the source code is not the |
---|
344 | easiest thing in the world and if you have no experience it |
---|
345 | can be quite difficult. In this case just avoid the aforementioned |
---|
346 | features or check each converted font to make sure that it |
---|
347 | works properly. |
---|
348 | <p> |
---|
349 | |
---|
350 | <li> The Type1 font library from the standard X11 distribution |
---|
351 | does not work on HP-UX (at least, up to 10.01). The font server |
---|
352 | supplied with HP-UX up to 10.01 is also broken. Starting from |
---|
353 | HP-UX 10.20 (I don't know about 10.10) they supply a proprietary font |
---|
354 | library and the converted fonts work fine with it, provided that |
---|
355 | they are configured properly (see the file <A HREF="FONTS.hpux.html">FONTS.hpux</A>). |
---|
356 | <p> |
---|
357 | |
---|
358 | <li> The <tt>fonts.scale</tt> files created by the older versions of the |
---|
359 | <tt>ttf2pt1</tt> installation program (up to release 3.1) have conflicted |
---|
360 | with the language definitions of the <tt>Xfsft</tt> font server and |
---|
361 | parts of it included into XFree86. To overcome this incompatibility |
---|
362 | the never versions creats the <tt>fonts.scale</tt> file describing all the |
---|
363 | fonts as belonging to the <tt>adobe-fontspecific</tt> encoding and |
---|
364 | the <tt>fonts.alias</tt> file with the proper names. The drawback of |
---|
365 | this solution is that <tt>xlsfonts</tt> gives the list of twice more |
---|
366 | fonts. But as a side effect the option <tt><b>ENFORCEISO</b></tt> in |
---|
367 | `<tt>convert.cfg</tt>' is not required for X11 any more. |
---|
368 | <p> |
---|
369 | |
---|
370 | <li> The conversion script has no support for Eastern multi-plane fonts. |
---|
371 | Contribution of such a support would be welcome. |
---|
372 | <p> |
---|
373 | </ul> |
---|
374 | <!-- =stop --> |
---|
375 | <!-- =section cv FILES --> |
---|
376 | <!-- ==over 2 --> |
---|
377 | <!-- ==item * --> |
---|
378 | <!-- =text TTF2PT1_SHAREDIR/scripts/convert.cfg.sample --> |
---|
379 | <!-- ==item * --> |
---|
380 | <!-- =text TTF2PT1_SHAREDIR/scripts/* --> |
---|
381 | <!-- ==item * --> |
---|
382 | <!-- =text TTF2PT1_SHAREDIR/README --> |
---|
383 | <!-- ==item * --> |
---|
384 | <!-- =text TTF2PT1_SHAREDIR/FONTS --> |
---|
385 | <!-- ==item * --> |
---|
386 | <!-- =text TTF2PT1_SHAREDIR/* --> |
---|
387 | <!-- ==item * --> |
---|
388 | <!-- =text TTF2PT1_BINDIR/ttf2pt1 --> |
---|
389 | <!-- ==back --> |
---|
390 | <!-- =stop --> |
---|
391 | <!-- =section cv SEE ALSO --> |
---|
392 | <!-- ==over 4 --> |
---|
393 | <!-- ==item * --> |
---|
394 | <!-- =text L<ttf2pt1(1)> --> |
---|
395 | <!-- ==item * --> |
---|
396 | <!-- =text L<ttf2pt1_x2gs(1)> --> |
---|
397 | <!-- ==item * --> |
---|
398 | <!-- =text L<t1asm(1)> --> |
---|
399 | <!-- ==back --> |
---|
400 | <!-- =stop --> |
---|
401 | |
---|
402 | <A NAME="gs"></A> |
---|
403 | <H3> |
---|
404 | Ghostscript |
---|
405 | </H3> |
---|
406 | <! |
---|
407 | =========== |
---|
408 | > |
---|
409 | <!-- =section gs NAME --> |
---|
410 | <!-- =text B<ttf2pt1_x2gs> - font installer for Ghostscript --> |
---|
411 | <!-- =stop --> |
---|
412 | |
---|
413 | <!-- =section gs DESCRIPTION --> |
---|
414 | The fonts generated with <b>ttf2pt1</b> work fine with Ghostscript by |
---|
415 | themselves. The script `<b>x2gs</b>' (or `<b>ttf2pt1_x2gs</b>' when installed |
---|
416 | into a public directory, to avoid name conflicts with other |
---|
417 | programs) links the font files from the X11 direcotry into the Ghostscript |
---|
418 | directory and automatically creates the description file (<tt>Fontmap</tt>) |
---|
419 | in Ghostscript format. |
---|
420 | <!-- =stop --> |
---|
421 | |
---|
422 | It's called as: |
---|
423 | <p> |
---|
424 | |
---|
425 | <!-- =section gs SYNOPSIS --> |
---|
426 | <!-- =text ttf2pt1_x2gs B<[config-file]> --> |
---|
427 | <!-- =stop --> |
---|
428 | <blockquote> |
---|
429 | x2gs <i>[config-file]</i> |
---|
430 | </blockquote> |
---|
431 | |
---|
432 | <!-- =section gs DESCRIPTION --> |
---|
433 | If the configuration file is not specified as an argument then the file |
---|
434 | `<TT>convert.cfg</TT>' in the current directory is used, just like the |
---|
435 | `<tt>convert</tt>' script does. Indeed, this configuration file is used for |
---|
436 | both scripts. |
---|
437 | <p> |
---|
438 | |
---|
439 | The Ghostscript-related parameters in the configuration file are: |
---|
440 | <p> |
---|
441 | |
---|
442 | <b><tt>DSTDIR</tt></b> - the X11 font directory used by `<tt>x2gs</tt>' as the |
---|
443 | source of the fonts. This parameter is common with the X11 |
---|
444 | configuration. |
---|
445 | <p> |
---|
446 | |
---|
447 | <b><tt>GSDIR</tt></b> - the base directory of Ghostsript. If this |
---|
448 | parameter is set to an empty string then `<tt>convert</tt>' won't |
---|
449 | call `<tt>x2gs</tt>'. So if you want to get only the X11 fonts |
---|
450 | installed then set this parameter to an empty string. This |
---|
451 | directory may vary on various system, so please check your |
---|
452 | system and set this value accordingly before running the script. |
---|
453 | <p> |
---|
454 | |
---|
455 | <b><tt>GSFONTDIR</tt></b> - the font directory of Ghostscript. In the standard |
---|
456 | Ghostscript installation it's a subdirectory of <tt>GSDIR</tt> |
---|
457 | but some systems may use completely different directories. |
---|
458 | <p> |
---|
459 | |
---|
460 | <b><tt>GSCONFDIR</tt></b> - the configuration subdirectory of Ghostscript |
---|
461 | that contains the <tt>Fontmap</tt> file. |
---|
462 | <p> |
---|
463 | |
---|
464 | <b><tt>INSTALLFONTMAP</tt></b> - if the value is set to <b><tt>YES</tt></b> then |
---|
465 | install the entries for the new fonts right into the main |
---|
466 | <tt>Fontmap</tt> file. Otherwise just leave the file <tt>Fontmap.ttf</tt> |
---|
467 | in the Ghostscript configuration directory. |
---|
468 | <p> |
---|
469 | |
---|
470 | |
---|
471 | After preparing the configuration file run the script. It symbolicaly links |
---|
472 | all the font files and creates the description file <tt>Fontmap.ttf</tt> in |
---|
473 | <tt>GSCONDFIR</tt>. After that there are two choices. |
---|
474 | <p> |
---|
475 | |
---|
476 | If the option <tt>INSTALLFONTMAP</tt> was set to <tt>YES</tt> then |
---|
477 | the font descriptions are also automatically installed into the |
---|
478 | master <tt>Fontmap</tt> file. The script is clever enough to |
---|
479 | detect if it was run multiple times with the same directories |
---|
480 | and if so it replaces the old <tt>Fontmap</tt> entries with |
---|
481 | the new ones instead of just accumulating all of them. You |
---|
482 | may also run it multiple times for multiple X11 directories |
---|
483 | and all the results will be properly collected in the <tt>Fontmap</tt>. |
---|
484 | But it's your responsibility to watch that the names of the |
---|
485 | font files don't overlap. If the X11 font directory gets |
---|
486 | renamed then you have to remove its font entries from the |
---|
487 | <tt>Fontmap</tt> and only after that re-run `<tt>x2gs</tt>' |
---|
488 | for the new directory. |
---|
489 | <p> |
---|
490 | |
---|
491 | On the other hand if the option <tt>INSTALLFONTMAP</tt> was set to |
---|
492 | <tt>NO</tt> then go to the <tt>GSCONFDIR</tt> directory and insert the |
---|
493 | contents of <tt>Fontmap.ttf</tt> into the <tt>Fontmap</tt> file |
---|
494 | manually. This step may be left manual to make the installation |
---|
495 | a little bit more safe. |
---|
496 | <p> |
---|
497 | |
---|
498 | After that you may also want to redefine some of the aliases in |
---|
499 | <tt>Fontmap</tt> to refer to the newly installed fonts. |
---|
500 | But the redefinition of the aliases may be dangerous if the width of |
---|
501 | characters in the new font will be different from the old font. |
---|
502 | Alas, there is no visible solution of this problem yet. |
---|
503 | <p> |
---|
504 | <!-- =stop --> |
---|
505 | <!-- =section gs FILES --> |
---|
506 | <!-- ==over 2 --> |
---|
507 | <!-- ==item * --> |
---|
508 | <!-- =text TTF2PT1_SHAREDIR/scripts/convert.cfg.sample --> |
---|
509 | <!-- ==item * --> |
---|
510 | <!-- =text TTF2PT1_SHAREDIR/scripts/* --> |
---|
511 | <!-- ==item * --> |
---|
512 | <!-- =text TTF2PT1_SHAREDIR/README --> |
---|
513 | <!-- ==item * --> |
---|
514 | <!-- =text TTF2PT1_SHAREDIR/FONTS --> |
---|
515 | <!-- ==item * --> |
---|
516 | <!-- =text TTF2PT1_SHAREDIR/* --> |
---|
517 | <!-- ==item * --> |
---|
518 | <!-- =text TTF2PT1_BINDIR/ttf2pt1 --> |
---|
519 | <!-- ==back --> |
---|
520 | <!-- =stop --> |
---|
521 | <!-- =section gs SEE ALSO --> |
---|
522 | <!-- ==over 4 --> |
---|
523 | <!-- ==item * --> |
---|
524 | <!-- =text L<ttf2pt1(1)> --> |
---|
525 | <!-- ==item * --> |
---|
526 | <!-- =text L<ttf2pt1_convert(1)> --> |
---|
527 | <!-- ==item * --> |
---|
528 | <!-- =text L<t1asm(1)> --> |
---|
529 | <!-- ==back --> |
---|
530 | <!-- =stop --> |
---|
531 | |
---|
532 | <A NAME="win"></A> |
---|
533 | <H3> |
---|
534 | MS Windows |
---|
535 | </H3> |
---|
536 | <! |
---|
537 | =========== |
---|
538 | > |
---|
539 | |
---|
540 | <b>Ttf2pt1</b> can be built on Windows either with native compiler or in |
---|
541 | POSIX emulation mode. |
---|
542 | <p> |
---|
543 | |
---|
544 | Native MS Windows compilers require a different way to build the converter |
---|
545 | instead of the Makefile (their <tt>make</tt> programs commonly are quite weird |
---|
546 | and limited in capabilities). An example of batch file <tt>winbuild.bat</tt> |
---|
547 | is provided for MS Visual C/C++. Probably it can be easily adapted for other |
---|
548 | 32-bit Windows and DOS compilers. The important part is to define the |
---|
549 | preprocessor symbol WINDOWS during compilation. |
---|
550 | <p> |
---|
551 | |
---|
552 | Cygnus <tt>make</tt> almost supports full Makefiles but not quite. Seems |
---|
553 | like its POSIX support is also of the same quality "almost but not quite". |
---|
554 | So another command file <tt>cygbuild.sh</tt> is provided for Cygnus GNU C, also |
---|
555 | with the preprocessor symbol WINDOWS defined. It is intended to be run from |
---|
556 | the Cygnus BASH shell. To run the programs produced by the Cygnus compiler |
---|
557 | the Cygnus library file <tt>CYGWIN1.DLL</tt> should be copied first into |
---|
558 | <tt>C:\WINDOWS</tt>. |
---|
559 | <p> |
---|
560 | |
---|
561 | To run the accompanying scripts Perl for Windows will be required as well as |
---|
562 | other tools from the Cygnus set. |
---|
563 | <p> |
---|
564 | |
---|
565 | The Windows support was not particularly tested, so in case of problems with |
---|
566 | building or running the converter please let us know. |
---|
567 | <p> |
---|
568 | |
---|
569 | The pre-built code (possibly of an older version) of ttf2pt1 for MS Windows is |
---|
570 | available from the GnuWin32 project from |
---|
571 | |
---|
572 | <A HREF="http://gnuwin32.sourceforge.net/packages/ttf2pt1.htm">http://gnuwin32.sourceforge.net/packages/ttf2pt1.htm</A> |
---|
573 | <p> |
---|
574 | |
---|
575 | <A NAME="netscape"></a> |
---|
576 | <H3> |
---|
577 | Netscape Navigator/Communicator |
---|
578 | </H3> |
---|
579 | <! |
---|
580 | =============================== |
---|
581 | > |
---|
582 | |
---|
583 | Basically, the biggest problem with Netscape Navigator is that |
---|
584 | it has built-in fixed PostScript font names and built-in fixed |
---|
585 | glyph tables for them. Oh, no, that's two! Let's start over: |
---|
586 | basically the two biggest problems of Netscape Navigator are |
---|
587 | that (one)it has built-in fixed PostScript font names and (two) |
---|
588 | built-in fixed glyph tables for them and (three) it always |
---|
589 | assumes that the fonts have ISOLatin1 encoding. OK, let's |
---|
590 | start over again: basically the three biggest problems of Netscape |
---|
591 | Navigator are that (one) it has built-in fixed PostScript font names, |
---|
592 | (two) built-in fixed glyph tables for them and (three) it always |
---|
593 | assumes that the fonts have ISOLatin1 encoding and (four) it |
---|
594 | does not remember the scaled font size between the sessions. |
---|
595 | You did not expect such a Spanish Inquisition, did you ? (<A HREF="#nsfn1">*</a>) |
---|
596 | <p> |
---|
597 | |
---|
598 | Luckily, we have solutions for all of these problems. They are |
---|
599 | located in the subdirectory `<tt>app/netscape</tt>' and described |
---|
600 | in <A HREF="app/netscape/README.html">app/netscape/README</a>. |
---|
601 | <p> |
---|
602 | |
---|
603 | <A NAME="nsfn1"></a> |
---|
604 | -------<br> |
---|
605 | <FONT SIZE=-1>*) See Monty Python's Flying Circus, episode 15</FONT></FONT> |
---|
606 | <p> |
---|
607 | |
---|
608 | <FONT COLOR="#3333FF"><FONT SIZE=-1>*8*</FONT></FONT> |
---|
609 | <H4> |
---|
610 | Netscape and cyrillic fonts<br> |
---|
611 | <! |
---|
612 | --------------------------- |
---|
613 | > |
---|
614 | (courtesy of Zvezdan Petkovic) |
---|
615 | </H4> |
---|
616 | |
---|
617 | If you use TrueType fonts in your X, as I do, and you always get |
---|
618 | KOI8-R encoded pages, then your Netscape does not recognise windows-1251 |
---|
619 | encoding. Microsoft TrueType fonts simply declare all encodings they |
---|
620 | can support including KOI8-R. For some reason, KOI8-R always wins over |
---|
621 | ISO-8859-5 in Netscape under X. If you are reading other cyrillic |
---|
622 | languages besides Russian, you might want to either erase KOI8-R entries |
---|
623 | from the fonts.dir and fonts.scale files, or alternatively fix Netscape. |
---|
624 | I put this line in my .Xdefaults. |
---|
625 | <p> |
---|
626 | |
---|
627 | <blockquote><tt> |
---|
628 | Netscape*documentFonts.charset*koi8-r: iso-8859-5 |
---|
629 | </tt></blockquote> |
---|
630 | <p> |
---|
631 | |
---|
632 | Notice that you can still read Russian sites without trouble because |
---|
633 | Netscape translates KOI8-R to ISO-8859-5 on the fly. I read both Russian |
---|
634 | and Serbian sites with no trouble. |
---|
635 | <p> |
---|
636 | |
---|
637 | <b>Note:</b> <i>If anybody knows the way to tell Netscape under Unix how to |
---|
638 | recognise {windows,ibm,cp}-1251 encoded fonts, I'd like to hear about that.</i> |
---|
639 | <p> |
---|
640 | |
---|
641 | <A NAME="rpm"></a> |
---|
642 | <H3> |
---|
643 | Linux RPM package |
---|
644 | </H3> |
---|
645 | <! |
---|
646 | ================= |
---|
647 | > |
---|
648 | |
---|
649 | The spec file for the creation of a Linux RPM package is located in |
---|
650 | <tt>app/RPM</tt>. It has been contributed by Johan Vromans. When |
---|
651 | <tt>make all</tt> is ran in the main directory it among the other |
---|
652 | things creates the version of itself adapted to Linux in <tt>app/RPM</tt>, |
---|
653 | you may want to copy that version back to the main directory. |
---|
654 | <p> |
---|
655 | |
---|
656 | <B>Warning:</B> Please note that the install section is incomplete, and |
---|
657 | the installed scripts won't work until the paths inside them |
---|
658 | are corrected. |
---|
659 | <p> |
---|
660 | |
---|
661 | <A NAME="framemaker"></a> |
---|
662 | <H3> |
---|
663 | FrameMaker |
---|
664 | </H3> |
---|
665 | <! |
---|
666 | ========== |
---|
667 | > |
---|
668 | |
---|
669 | The fonts and AFM files generated by the version 3.2 and higher |
---|
670 | should work with Framemaker without problems. The AFM files |
---|
671 | generated by the previous versions of the converter require a |
---|
672 | line added to them: |
---|
673 | <p> |
---|
674 | |
---|
675 | <tt>EncodingScheme FontSpecific</tt> |
---|
676 | <p> |
---|
677 | |
---|
678 | And the underscores in the font names of the font and AFM files |
---|
679 | generated by the older versions may need to be changed to dashes. |
---|
680 | <p> |
---|
681 | |
---|
682 | <B>NOTE by Jason Baietto:</B> Ignore the directions in the Frame on-line docs |
---|
683 | that say to put a "serverdict begin 0 exitserver" line in the pfa files. |
---|
684 | Doing this caused both my printer and ghostscript to choke on the resulting |
---|
685 | output from FrameMaker, so I would not advise doing this (though your |
---|
686 | mileage may vary). |
---|
687 | <p> |
---|
688 | |
---|
689 | <A NAME="soffice"></a> |
---|
690 | <H3> |
---|
691 | StarOffice |
---|
692 | </H3> |
---|
693 | <! |
---|
694 | ========== |
---|
695 | > |
---|
696 | |
---|
697 | StarOffice 5.1x has been reported to crash if the <tt>.afm</tt> file contains |
---|
698 | spaces in the values of such statements as <b>Version</b>, <b>Weight</b> etc. |
---|
699 | These spaces are permitted by the Adobe spec, so this is a problem of |
---|
700 | StarOffice. The easiest way to fix these <tt>.afm</tt> files for StarOffice |
---|
701 | is to remove spaces in these strings or remove these strings (in case if |
---|
702 | they are optional) at all. This can be done automatically with a <tt>sed</tt> |
---|
703 | script. It seems that StarOffice 5.2 has this problem fixed, so we decided to |
---|
704 | spend no efforts on providing workarounds for 5.1 with <tt>ttf2pt1</tt>. |
---|
705 | <p> |
---|
706 | |
---|
707 | </BODY> |
---|
708 | </HTML> |
---|