source: branches/2.2/filemanager/tp/dompdf/lib/ttf2ufm/ttf2ufm-src/ttf2pt1.1 @ 3019

Revision 3019, 33.7 KB checked in by amuller, 14 years ago (diff)

Ticket #1135 - Corrigindo CSS e adicionando filemanager

Line 
1.rn '' }`
2''' $RCSfile: ttf2pt1.1,v $$Revision: 1.1 $$Date: 2008-03-12 06:35:44 $
3'''
4''' $Log: not supported by cvs2svn $
5'''
6.de Sh
7.br
8.if t .Sp
9.ne 5
10.PP
11\fB\\$1\fR
12.PP
13..
14.de Sp
15.if t .sp .5v
16.if n .sp
17..
18.de Ip
19.br
20.ie \\n(.$>=3 .ne \\$3
21.el .ne 3
22.IP "\\$1" \\$2
23..
24.de Vb
25.ft CW
26.nf
27.ne \\$1
28..
29.de Ve
30.ft R
31
32.fi
33..
34'''
35'''
36'''     Set up \*(-- to give an unbreakable dash;
37'''     string Tr holds user defined translation string.
38'''     Bell System Logo is used as a dummy character.
39'''
40.tr \(*W-|\(bv\*(Tr
41.ie n \{\
42.ds -- \(*W-
43.ds PI pi
44.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
45.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
46.ds L" ""
47.ds R" ""
48'''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
49'''   \*(L" and \*(R", except that they are used on ".xx" lines,
50'''   such as .IP and .SH, which do another additional levels of
51'''   double-quote interpretation
52.ds M" """
53.ds S" """
54.ds N" """""
55.ds T" """""
56.ds L' '
57.ds R' '
58.ds M' '
59.ds S' '
60.ds N' '
61.ds T' '
62'br\}
63.el\{\
64.ds -- \(em\|
65.tr \*(Tr
66.ds L" ``
67.ds R" ''
68.ds M" ``
69.ds S" ''
70.ds N" ``
71.ds T" ''
72.ds L' `
73.ds R' '
74.ds M' `
75.ds S' '
76.ds N' `
77.ds T' '
78.ds PI \(*p
79'br\}
80.\"     If the F register is turned on, we'll generate
81.\"     index entries out stderr for the following things:
82.\"             TH      Title
83.\"             SH      Header
84.\"             Sh      Subsection
85.\"             Ip      Item
86.\"             X<>     Xref  (embedded
87.\"     Of course, you have to process the output yourself
88.\"     in some meaninful fashion.
89.if \nF \{
90.de IX
91.tm Index:\\$1\t\\n%\t"\\$2"
92..
93.nr % 0
94.rr F
95.\}
96.TH TTF2PT1 1 "version 3.4.4" "December 31, 2003" "TTF2PT1 Font Converter"
97.UC
98.if n .hy 0
99.if n .na
100.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
101.de CQ          \" put $1 in typewriter font
102.ft CW
103'if n "\c
104'if t \\&\\$1\c
105'if n \\&\\$1\c
106'if n \&"
107\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
108'.ft R
109..
110.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
111.       \" AM - accent mark definitions
112.bd B 3
113.       \" fudge factors for nroff and troff
114.if n \{\
115.       ds #H 0
116.       ds #V .8m
117.       ds #F .3m
118.       ds #[ \f1
119.       ds #] \fP
120.\}
121.if t \{\
122.       ds #H ((1u-(\\\\n(.fu%2u))*.13m)
123.       ds #V .6m
124.       ds #F 0
125.       ds #[ \&
126.       ds #] \&
127.\}
128.       \" simple accents for nroff and troff
129.if n \{\
130.       ds ' \&
131.       ds ` \&
132.       ds ^ \&
133.       ds , \&
134.       ds ~ ~
135.       ds ? ?
136.       ds ! !
137.       ds /
138.       ds q
139.\}
140.if t \{\
141.       ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
142.       ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
143.       ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
144.       ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
145.       ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
146.       ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
147.       ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
148.       ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
149.       ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
150.\}
151.       \" troff and (daisy-wheel) nroff accents
152.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
153.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
154.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
155.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
156.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
157.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
158.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
159.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
160.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
161.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
162.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
163.ds ae a\h'-(\w'a'u*4/10)'e
164.ds Ae A\h'-(\w'A'u*4/10)'E
165.ds oe o\h'-(\w'o'u*4/10)'e
166.ds Oe O\h'-(\w'O'u*4/10)'E
167.       \" corrections for vroff
168.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
169.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
170.       \" for low resolution devices (crt and lpr)
171.if \n(.H>23 .if \n(.V>19 \
172\{\
173.       ds : e
174.       ds 8 ss
175.       ds v \h'-1'\o'\(aa\(ga'
176.       ds _ \h'-1'^
177.       ds . \h'-1'.
178.       ds 3 3
179.       ds o a
180.       ds d- d\h'-1'\(ga
181.       ds D- D\h'-1'\(hy
182.       ds th \o'bp'
183.       ds Th \o'LP'
184.       ds ae ae
185.       ds Ae AE
186.       ds oe oe
187.       ds Oe OE
188.\}
189.rm #[ #] #H #V #F C
190.SH "NAME"
191TTF2PT1 \- A True Type to PostScript Type 1 Font Converter
192.SH "SYNOPSIS"
193\f(CWttf2pt1 \fI[-options] ttffont.ttf [Fontname]\fR\fR
194.PP
195or
196.PP
197\f(CWttf2pt1 \fI[-options] ttffont.ttf -\fR\fR
198.SH "DESCRIPTION"
199Ttf2pt1 is a font converter from the True Type format (and some other formats
200supported by the FreeType library as well) to the Adobe Type1 format.
201.PP
202The versions 3.0 and later got rather extensive post-processing algorithm that
203brings the converted fonts to the requirements of the Type1 standard, tries to
204correct the rounding errors introduced during conversions and some simple
205kinds of bugs that are typical for the public domain TTF fonts. It
206also generates the hints that enable much better rendering of fonts in
207small sizes that are typical for the computer displays. But everything
208has its price, and some of the optimizations may not work well for certain
209fonts. That's why the options were added to the converter, to control
210the performed optimizations.
211.SH "OPTIONS"
212The first variant creates the file \f(CWFontname.pfa\fR (or \f(CWFontname.pfb\fR if the
213option \*(L'\fB\-b\fR\*(R' was used) with the converted font and \f(CWFontname.afm\fR with the
214font metrics, the second one prints the font or another file (if the option
215\&\*(R'\fB\-G\fR\*(R' was used) on the standard output from where it can be immediately
216piped through some filter. If no \f(CWFontname\fR is specified for the first
217variant, the name is generated from \f(CWttffont\fR by replacing the \f(CW.ttf\fR
218filename suffix.
219.PP
220Most of the time no options are neccessary (with a possible exception
221of \*(L'\fB\-e\fR'). But if there are some troubles with the resulting font, they
222may be used to control the conversion.
223The \fBoptions\fR are:
224.Ip "\(bu" 2
225\f(CW\fB-a\fR\fR \- Include all the glyphs from the source file into the converted
226file. If this option is not specified then only the glyphs that have
227been assigned some encoding are included, because the rest of glyphs
228would be inaccessible anyway and would only consume the disk space.
229But some applications are clever enough to change the encoding on
230the fly and thus use the other glyphs, in this case they could
231benefit from using this option. But there is a catch: the X11 library
232has rather low limit for the font size. Including more glyphs increases
233the file size and thus increases the chance of hitting this limit.
234See \f(CWapp/X11/README\fR for the description of a
235patch to X11 which fixes this problem.
236.Ip "\(bu" 2
237\f(CW\fB-b\fR\fR \- Encode the resulting font to produce a ready \f(CW.pfb\fR file.
238.Ip "\(bu" 2
239\f(CW\fB-d \fIsuboptions\fR\fR\fR \- Debugging options. The suboptions are:
240.Sp
241\f(CW\fBa\fR\fR \- Print out the absolute coordinates of dots in outlines. Such
242a font can not be used by any program (that's why this option is
243incompatible with \*(L'\fB\-e\fR') but it has proven to be a valuable debuging
244information.
245.Sp
246\f(CW\fBr\fR\fR \- Do not reverse the direction of outlines. The \s-1TTF\s0 fonts have
247the standard direction of outlines opposite to the Type1 fonts. So
248they should be reversed during proper conversion. This option
249may be used for debugging or to handle a \s-1TTF\s0 font with wrong
250direction of outlines (possibly, converted in a broken way from
251a Type1 font). The first signs of the wrong direction are the
252letters like \*(L"P\*(R" or \*(L"B\*(R" without the unpainted \*(L"holes\*(R" inside.
253.Ip "\(bu" 2
254\f(CW\fB-e\fR\fR \- Assemble the resulting font to produce a ready \f(CW.pfa\fR file.
255.Sp
256[ S.B.: Personally I don't think that this option is particularly useful.
257The same result may be achieved by piping the unassembled data
258through t1asm, the Type 1 assembler. And, anyways, it's good to
259have the t1utils package handy. But Mark and many users think that
260this functionality is good and it took not much time to add this option. ]
261.Ip "\(bu" 2
262\f(CW\fB-F\fR\fR \- Force the Unicode encoding: any type of \s-1MS\s0 encoding specified
263in the font is ignored and the font is treated like it has Unicode
264encoding. \fB\s-1WARNING\s0:\fR this option is intended for buggy fonts
265which actually are in Unicode but are marked as something else. The
266effect on the other fonts is unpredictable.
267.Ip "\(bu" 2
268\f(CW\fB-G \fIsuboptions\fR\fR\fR \- File generation options. The suboptions may be lowercase
269or uppercase, the lowercase ones disable the generation of particular
270files, the corresponding uppercase suboptions enable the generation of the
271same kind of files. If the result of ttf2pt1 is requested to be printed on
272the standard output, the last enabling suboption of \fB\-G\fR determines
273which file will be written to the standard output and the rest of files
274will be discarded. For example, \fB\-G A\fR will request the \s-1AFM\s0 file.
275The suboptions to disable/enable the generation of the files are:
276.Sp
277\f(CW\fBf/F\fR\fR \- The font file. Depending on the other options this file
278will have one of the suffixes \f(CW.t1a\fR, \f(CW.pfa\fR or \f(CW.pfb\fR. If the conversion result
279is requested on the standard output ('\f(CW-\fR\*(R' is used as the output file name)
280then the font file will also be written there by default, if not overwritten
281by another suboption of \fB\-G\fR.
282\fBDefault: enabled\fR
283.Sp
284\f(CW\fBa/A\fR\fR \- The Adobe font metrics file (\f(CW.afm\fR).
285\fBDefault: enabled\fR
286.Sp
287\f(CW\fBe/E\fR\fR \- The dvips encoding file (\f(CW.enc\fR).
288\fBDefault: disabled\fR
289.Ip "\(bu" 2
290\f(CW\fB-l \fIlanguage\fR[+\fIargument\fR]\fR\fR \- Extract the fonts for the specified language from a
291multi-language Unicode font. If this option is not used the converter
292tries to guess the language by the values of the shell variable \s-1LANG\s0.
293If it is not able to guess the language by \s-1LANG\s0 it tries all the
294languages in the order they are listed.
295.Sp
296After the plus sign an optional argument for the language extractor
297may be specified. The format of the argument is absolutely up to
298the particular language converter. The primary purpose of the
299argument is to support selection of planes for the multi-plane
300Eastern encodings but it can also be used in any other way. The
301language extractor may decide to add the plane name in some form
302to the name of the resulting font. None of the currently supported
303languages make any use of the argument yet.
304.Sp
305As of now the following languages are supported:
306.Sp
307\ \ \f(CWlatin1\fR \- for all the languages using the Latin-1 encoding
308.Sp
309\ \ \f(CWlatin2\fR \- for the Central European languages
310.Sp
311\ \ \f(CWlatin4\fR \- for the Baltic languages
312.Sp
313\ \ \f(CWlatin5\fR \- for the Turkish language
314.Sp
315\ \ \f(CWcyrillic\fR \- for the languages with Cyrillic alphabet
316.Sp
317\ \ \f(CWrussian\fR \- historic synonym for cyrillic
318.Sp
319\ \ \f(CWbulgarian\fR \- historic synonym for cyrillic
320.Sp
321\ \ \f(CWadobestd\fR \- for the AdobeStandard encoding used by TeX
322.Sp
323\ \ \f(CWplane+\fIargument\fR\fR \- to select one plane from a multi-byte encoding
324.Sp
325The argument of the \*(L"\f(CWplane\fR\*(R" language may be in one of three forms:
326.Sp
327\ \ \f(CWplane+\fBpid=\fR\fI<pid>\fR\fB,eid=\fR\fI<eid>\fR\fR
328.Sp
329\ \ \f(CWplane+\fBpid=\fR\fI<pid>\fR\fB,eid=\fR\fI<eid>\fR\fB,\fR\fI<plane_number>\fR\fR
330.Sp
331\ \ \f(CWplane+\fI<plane_number>\fR\fR
332.Sp
333Pid (\s-1TTF\s0 platform id) and eid (\s-1TTF\s0 encoding id) select a particular
334\s-1TTF\s0 encoding table in the original font. They are specified as decimal
335numbers. If this particular encoding table is not present in the font
336file then the conversion fails. The native ("ttf") front-end parser supports
337only pid=3 (Windows platform), the FreeType-based ("ft") front-end supports
338any platform. If pid/eid is not specified then the \s-1TTF\s0 encoding table is
339determined as usual: Unicode encoding if it's first or an 8-bit encoding
340if not (and for an 8-bit encoding the plane number is silently ignored).
341To prevent the converter from falling back to an 8-bit encoding, specify
342the Unicode pid/eid value explicitly.
343.Sp
344Plane_number is a hexadecimal (if starts with \*(L"\fB0x\fR") or decimal number.
345It gives the values of upper bytes for which 256 characters will be
346selected. If not specified, defaults to 0. It is also used as a font
347name suffix (the leading \*(L"0x\*(R" is not included into the suffix).
348.Sp
349\fB\s-1NOTE\s0:\fR
350You may notice that the language names are not uniform: some are the
351names of particular languages and some are names of encodings. This
352is because of the different approaches. The original idea was to
353implement a conversion from Unicode to the appropriate Windows
354encoding for a given language. And then use the translation tables
355to generate the fonts in whatever final encodings are needed. This
356would allow to pile together the Unicode fonts and the non-Unicode
357Windows fonts for that language and let the program to sort them out
358automatically. And then generate fonts in all the possible encodings
359for that language. An example of this approach is the Russian language
360support. But if there is no multiplicity of encodings used for some
361languages and if the non-Unicode fonts are not considered important
362by the users, another way would be simpler to implement: just provide
363only one table for extraction of the target encoding from Unicode
364and don't bother with the translation tables. The latin* \*(L"languages\*(R"
365are examples of this approach. If somebody feels that he needs the
366Type1 fonts both in Latin-* and Windows encodings he or she is absolutely
367welcome to submit the code to implement it.
368.Sp
369\fB\s-1WARNING\s0:\fR
370Some of the glyphs included into the AdobeStandard encoding are not
371included into the Unicode standard. The most typical examples of such
372glyphs are ligatures like \*(L'fi\*(R', \*(L'fl\*(R' etc. Because of this the font
373designers may place them at various places. The converter tries to
374do its best, if the glyphs have honest Adobe names and/or are
375placed at the same codes as in the Microsoft fonts they will be
376picked up. Otherwise a possible solution is to use the option \*(L'\fB\-L\fR\*(R'
377with an external map.
378.Ip "\(bu" 2
379\f(CW\fB-L \fIfile\fR[+[pid=\fI<pid>\fR,eid=\fI<eid>\fR,][\fIplane\fR]]\fR\fR \- Extract the fonts for the specified
380language from a multi-language font using the map from this file. This is
381rather like the option \*(L'\fB\-l\fR\*(R' but the encoding map is not
382compiled into the program, it's taken from that file, so it's
383easy to edit. Examples of such files are provided in
384\f(CWmaps/adobe-standard-encoding.map\fR, \f(CWCP1250.map\fR. (\fB\s-1NOTE\s0:\fR
385the \*(L'standard encoding\*(R' map does not include all the glyphs of the
386AdobeStandard encoding, it's provided only as an example.) The
387description of the supported map formats is in the file
388\f(CWmaps/unicode-sample.map\fR.
389.Sp
390Likewise to \*(L'\fB\-l\fR\*(R', an argument may be specified after the map file
391name. But in this case the argument has fixed meaning: it selects the
392original \s-1TTF\s0 encoding table (the syntax is the same as in \*(L'\fB\-l plane\fR')
393and/or a plane of the map file. The plane name also gets added after dash
394to the font name. The plane is a concept used in the Eastern fonts with big
395number of glyphs: one \s-1TTF\s0 font gets divided into multiple Type1 fonts,
396each containing one plane of up to 256 glyphs. But with a little
397creativity this concept may be used for other purposes of combining
398multiple translation maps into one file.  To extract multiple planes
399from a \s-1TTF\s0 font \f(CWttf2pt1\fR must be run multiple times, each time with
400a different plane name specified.
401.Sp
402The default original \s-1TTF\s0 encoding table used for the option \*(L'\fB\-L\fR\*(R' is
403Unicode. The map files may include directives to specify different original
404\s-1TTF\s0 encodings. However if the pid/eid pair is specified with
405it overrides any original encoding specified in the map file.
406.Ip "\(bu" 2
407\f(CW\fB-m \fItype\fR=\fIvalue\fR\fR\fR \- Set maximal or minimal limits of resources.
408These limits control the the font generation by limiting the resources
409that the font is permitted to require from the PostScript interpreter.
410The currently supported types of limits are:
411.Sp
412\f(CW\fBh\fR\fR \- the maximal hint stack depth for the substituted hints.
413The default value is 128, according to the limitation in X11. This seems to
414be the lowest (and thus the safest) widespread value. To display the
415hint stack depth required by each glyph in a \f(CW.t1a\fR file use the script
416\f(CWscripts/cntstems.pl\fR.
417.Ip "\(bu" 2
418\f(CW\fB-O \fIsuboptions\fR\fR\fR \- Outline processing options. The suboptions
419may be lowercase or uppercase, the lowercase ones disable the features,
420the corresponding uppercase suboptions enable the same features.
421The suboptions to disable/enable features are:
422.Sp
423\f(CW\fBb/B\fR\fR \- Guessing of the ForceBold parameter. This parameter helps
424the Type1 engine to rasterize the bold fonts properly at small sizes.
425But the algorithm used to guess the proper value of this flag makes
426that guess based solely on the font name. In rare cases that may cause
427errors, in these cases you may want to disable this guessing.
428\fBDefault: enabled\fR
429.Sp
430\f(CW\fBh/H\fR\fR \- Autogeneration of hints. The really complex outlines
431may confuse the algorithm, so theoretically it may be useful
432sometimes to disable them. Although up to now it seems that
433even bad hints are better than no hints at all.
434\fBDefault: enabled\fR
435.Sp
436\f(CW\fBu/U\fR\fR \- Hint substitution. Hint substitution is a technique
437permitting generation of more detailed hints for the rasterizer. It allows
438to use different sets of hints for different parts of a glyph and change
439these sets as neccessary during rasterization (that's why \*(L"substituted"). 
440So it should improve the quality of the fonts rendered at small sizes. 
441But there are two catches: First, the X11 library has rather low limit for
442the font size. More detailed hints increase the file size and thus increase
443the chance of hitting this limit (that does not mean that you shall hit it
444but you may if your fonts are particularly big). This is especially
445probable for Unicode fonts converted with option \*(L'\fB\-a\fR\*(R', so you may want to
446use \*(L'\fB\-a\fR\*(R' together with \*(L'\fB\-Ou\fR\*(R'. See \f(CWapp/X11/README\fR for the description of
447a patch to X11 which fixes this problem. Second, some rasterizers (again,
448X11 is the typical example) have a limitation for total number of hints
449used when drawing a glyph (also known as the hint stack depth). If that
450stack overflows the glyph is ignored. Starting from version 3.22 \f(CWttf2pt1\fR
451uses algorithms to minimizing this depth, with the trade-off of slightly
452bigger font files. The glyphs which still exceed the limit set by option
453\&\*(R'\fB\-mh\fR\*(R' have all the substituted hints removed and only base hints left.
454The algorithms seem to have been refined far enough to make the fonts with
455substituted hints look better than the fonts without them or at least the
456same. Still if the original fonts are not well-designed the detailed
457hinting may emphasize the defects of the design, such as non-even thickness
458of lines. So provided that you are not afraid of the X11 bug the best idea
459would be to generate a font with this feature and without it, then compare
460the results using the program \f(CWother/cmpf\fR (see the description
461in \f(CWother/README\fR) and decide which one looks better.
462\fBDefault: enabled\fR
463.Sp
464\f(CW\fBo/O\fR\fR \- Space optimization of the outlines\*(R' code. This kind of optimization
465never hurts, and the only reason to disable this feature is for comparison
466of the generated fonts with the fonts generated by the previous versions of
467converter. Well, it _almost_ never hurts. As it turned out there exist
468some brain-damaged printers which don't understand it. Actually this
469feature does not change the outlines at all. The Type 1 font manual
470provides a set of redundant operators that make font description shorter,
471such as \*(L'10 hlineto\*(R' instead of \*(L'0 10 rlineto\*(R' to describe a horizontal
472line. This feature enables use of these operators.
473\fBDefault: enabled\fR
474.Sp
475\f(CW\fBs/S\fR\fR \- Smoothing of outlines. If the font is broken in some
476way (even the ones that are not easily noticeable), such smoothing
477may break it further. So disabling this feature is the first thing to be
478tried if some font looks odd. But with smoothing off the hint generation
479algorithms may not work properly too.
480\fBDefault: enabled\fR
481.Sp
482\f(CW\fBt/T\fR\fR \- Auto-scaling to the 1000x1000 Type1 standard matrix. The
483\s-1TTF\s0 fonts are described in terms of an arbitrary matrix up to
4844000x4000. The converted fonts must be scaled to conform to
485the Type1 standard. But the scaling introduces additional rounding
486errors, so it may be curious sometimes to look at the font in its
487original scale.
488\fBDefault: enabled\fR
489.Sp
490\f(CW\fBv/V\fR\fR \- Do vectorization on the bitmap fonts. Functionally
491\*(L"vectorization\*(R" is the same thing as \*(L"autotracing\*(R", a different word is
492used purely to differentiate it from the Autotrace library. It tries to
493produce nice smooth outlines from bitmaps. This feature is still a work
494in progress though the results are already mostly decent.
495\fBDefault: disabled\fR
496.Sp
497\f(CW\fBw/W\fR\fR \- Glyphs\*(R' width corection. This option is designed to be
498used on broken fonts which specify too narrow widths for the
499letters. You can tell that a font can benefit from this option
500if you see that the characters are smashed together without
501any whitespace between them. This option causes the converter
502to set the character widths to the actual width of this character
503plus the width of a typical vertical stem. But on the other hand
504the well-designed fonts may have characters that look better if
505their widths are set slightly narrower. Such well-designed fonts
506will benefit from disabling this feature. You may want to convert
507a font with and without this feature, compare the results and
508select the better one. This feature may be used only on proportional
509fonts, it has no effect on the fixed-width fonts.
510\fBDefault: disabled\fR
511.Sp
512\f(CW\fBz/Z\fR\fR \- Use the Autotrace library on the bitmap fonts. The results
513are horrible and \fBthe use of this option is not recommended\fR. This option is
514present for experimental purposes. It may change or be removed in the
515future. The working tracing can be achieved with option \f(CW\fB-OV\fR\fR.
516\fBDefault: disabled\fR
517.Ip "\(bu" 2
518\f(CW\fB-p \fIparser_name\fR\fR\fR \- Use the specified front-end parser to read the font file.
519If this option is not used, ttf2pt1 selects the parser automatically based
520on the suffix of the font file name, it uses the first parser in its
521list that supports this font type. Now two parsers are supported:
522.Sp
523\ \ \f(CWttf\fR \- built-in parser for the ttf files (suffix \f(CW.ttf\fR)
524.Sp
525\ \ \f(CWbdf\fR \- built-in parser for the \s-1BDF\s0 files (suffix \f(CW.bdf\fR)
526.Sp
527\ \ \f(CWft\fR \- parser based on the FreeType-2 library (suffixes \f(CW.ttf\fR,
528\&\f(CW.otf\fR, \f(CW.pfa\fR, \f(CW.pfb\fR)
529.Sp
530The parser \f(CWft\fR is \fB\s-1NOT\s0\fR linked in by default. See \f(CWMakefile\fR
531for instructions how to enable it. We do no support this parser on
532Windows: probably it will work but nobody tried and nobody knows how
533to build it.
534.Sp
535The conversion of the bitmap fonts (such as \s-1BDF\s0) is simplistic yet,
536producing jagged outlines.  When converting such fonts, it might be
537a good idea to turn off the hint substitution (using option \fB\-Ou\fR)
538because the hints produced will be huge but not adding much to the
539quality of the fonts.
540.Ip "\(bu" 2
541\f(CW\fB-u \fInumber\fR\fR\fR \- Mark the font with this value as its
542UniqueID. The UniqueID is used by the printers with the hard disks
543to cache the rasterized characters and thus significantly
544speed-up the printing. Some of those printers just can't
545store the fonts without UniqueID on their disk.The problem
546is that the \s-1ID\s0 is supposed to be unique, as it name says. And
547there is no easy way to create a guaranteed unique \s-1ID\s0. Adobe specifies
548the range 4000000-4999999 for private IDs but still it's difficult
549to guarantee the uniqueness within it. So if you don't really need the
550UniqueID don't use it, it's optional. Luckily there are a few millions of
551possible IDs, so the chances of collision are rather low.
552If instead of the number a special value \*(L'\f(CW\fBA\fR\fR\*(R' is given
553then the converter generates the value of UniqueID automatically,
554as a hash of the font name. (\fB\s-1NOTE\s0:\fR  in the version 3.22 the
555algorithm for autogeneration of UniqueID was changed to fit the values
556into the Adobe-spacified range. This means that if UniqueIDs were used
557then the printer's cache may need to be flushed before replacing the
558fonts converted by an old version with fonts converted by a newer version).
559A simple way to find if any of the fonts in a given directory have
560duplicated UniqueIDs is to use the command:
561.Sp
562\f(CW\ \ cat *.pf[ab] | grep UniqueID | sort | uniq -c | grep -v ' 1 '\fR
563.Sp
564Or if you use \f(CWscripts/convert\fR it will do that for you automatically
565plus it will also give the exact list of files with duplicate UIDs.
566.Ip "\(bu" 2
567\f(CW\fB-v \fIsize\fR\fR\fR \- Re-scale the font to get the size of a typical uppercase
568letter somewhere around the specified size. Actually, it re-scales
569the whole font to get the size of one language-dependent letter to be
570at least of the specified size. Now this letter is \*(L"A\*(R" in all the
571supported languages. The size is specified in the points of the
572Type 1 coordinate grids, the maximal value is 1000. This is an
573experimental option and should be used with caution. It tries to
574increase the visible font size for a given point size and thus make
575the font more readable. But if overused it may cause the fonts to
576look out of scale. As of now the interesting values of size for
577this option seem to be located mostly between 600 and 850. This
578re-scaling may be quite useful but needs more experience to
579understand the balance of its effects.
580.Ip "\(bu" 2
581\f(CW\fB-W \fIlevel\fR\fR\fR \- Select the verbosity level of the warnings.
582Currently the levels from 0 to 4 are supported. Level 0 means no warnings
583at all, level 4 means all the possible warnings. The default level is 3.
584Other levels may be added in the future, so using the level number 99 is
585recommended to get all the possible warnings. Going below level 2 is
586not generally recommended because you may miss valuable information about
587the problems with the fonts being converted.
588.Ip "\(bu" 2
589\fBObsolete option:\fR
590\f(CW\fB-A\fR\fR \- Print the font metrics (.afm file) instead of the font on \s-1STDOUT\s0.
591Use \fB\-\s-1GA\s0\fR instead.
592.Ip "\(bu" 2
593\fBVery obsolete option:\fR
594.Sp
595The algorithm that implemented the forced fixed width had major
596flaws, so it was disabled. The code is still in the program and
597some day it will be refined and returned back. Meanwhile the
598option name \*(L'\fB\-f\fR\*(R' was reused for another option. The old version was:
599.Sp
600\f(CW\fB-f\fR\fR \- Don't try to force the fixed width of font. Normally the converter
601considers the fonts in which the glyph width deviates by not more
602than 5% as buggy fixed width fonts and forces them to have really
603fixed width. If this is undesirable, it can be disabled by this option.
604.PP
605The \f(CW.pfa\fR font format supposes that the description of the characters
606is binary encoded and encrypted. This converter does not encode or
607encrypt the data by default, you have to specify the option \*(L'\fB\-e\fR\*(R'
608or use the \f(CWt1asm\fR program to assemble (that means, encode and
609encrypt) the font program. The \f(CWt1asm\fR program that is included with
610the converter is actually a part of the \f(CWt1utils\fR package, rather old
611version of which may be obtained from
612.PP
613http://ttf2pt1.sourceforge.net/t1utils.tar.gz
614.PP
615Note that \f(CWt1asm\fR from the old version of that package won't work properly
616with the files generated by \f(CWttf2pt1\fR version 3.20 and later. Please use
617\f(CWt1asm\fR packaged with \f(CWttf2pt1\fR or from the new version \f(CWt1utils\fR
618instead. For a newer version of \f(CWt1utils\fR please look at
619.PP
620http://www.lcdf.org/~eddietwo/type/
621.SH "EXAMPLES"
622So, the following command lines:
623.PP
624\f(CWttf2pt1 -e ttffont.ttf t1font\fR
625.PP
626\f(CWttf2pt1 ttffont.ttf - | t1asm >t1font.pfa\fR
627.PP
628represent two ways to get a working font. The benefit of the second form
629is that other filters may be applied to the font between the converter
630and assembler.
631.SH "FILES"
632.Ip "\(bu" 2
633\s-1TTF2PT1_LIBXDIR/\s0t1asm
634.Ip "\(bu" 2
635\s-1TTF2PT1_SHAREDIR\s0/*
636.Ip "\(bu" 2
637\s-1TTF2PT1_SHAREDIR/\s0scripts/*
638.Ip "\(bu" 2
639\s-1TTF2PT1_SHAREDIR/\s0other/*
640.Ip "\(bu" 2
641\s-1TTF2PT1_SHAREDIR/README\s0
642.Ip "\(bu" 2
643\s-1TTF2PT1_SHAREDIR/FONTS\s0
644.SH "SEE ALSO"
645.Ip "\(bu" 4
646the \fIttf2pt1_convert(1)\fR manpage
647.Ip "\(bu" 4
648the \fIttf2pt1_x2gs(1)\fR manpage
649.Ip "\(bu" 4
650the \fIt1asm(1)\fR manpage
651.Ip "\(bu" 4
652ttf2pt1-announce@lists.sourceforge.net
653.Sp
654The mailing list with announcements about ttf2pt1. It is a moderated mailing
655with extremely low traffic. Everyone is encouraged to subscribe to keep in
656touch with the current status of project. To subscribe use the Web interface
657at http://lists.sourceforge.net/mailman/listinfo/ttf2pt1-announce.
658If you have only e-mail access to the Net then send a subscribe request to
659the development mailing list ttf2pt1-devel@lists.sourceforge.net and somebody
660will help you with subscription.
661.Ip "\(bu" 4
662ttf2pt1-devel@lists.sourceforge.net
663.Sp
664ttf2pt1-users@lists.sourceforge.net
665.Sp
666The ttf2pt1 mailing lists for development and users issues. They have not
667that much traffic either. To subscribe use the Web interface at
668http://lists.sourceforge.net/mailman/listinfo/ttf2pt1-devel
669and http://lists.sourceforge.net/mailman/listinfo/ttf2pt1-users.
670If you have only e-mail access to the Net then send a subscribe request to
671the development mailing list ttf2pt1-devel@lists.sourceforge.net and somebody
672will help you with subscription.
673.Ip "\(bu" 4
674http://ttf2pt1.sourceforge.net
675.Sp
676The main page of the project.
677.Sp
678http://www.netspace.net.au/~mheath/ttf2pt1/
679.Sp
680The old main page of the project.
681.SH "BUGS"
682It seems that many Eastern fonts use features of the TTF format that are
683not supported by the ttf2pt1's built-in front-end parser. Because of
684this for now we recommend using the FreeType-based parser (option
685\&\*(R'\fB\-p ft\fR') with the \*(L"\f(CWplane\fR\*(R" language.
686.Sh "Troubleshooting and bug reports"
687Have problems with conversion of some font ? The converter dumps core ? Or your
688printer refuses to understand the converted fonts ? Or some characters are
689missing ? Or some characters look strange ?
690.PP
691Send the bug reports to the ttf2pt1 development mailing list at
692ttf2pt1-devel@lists.sourceforge.net.
693.PP
694Try to collect more information about the problem and include it into
695the bug report. (Of course, even better if you would provide a ready
696fix, but just a detailed bug report is also good). Provide detailed
697information about your problem, this will speed up the response greatly.
698Don't just write \*(L"this font looks strange after conversion\*(R" but describe
699what's exactly wrong with it: for example, what characters look wrong
700and what exactly is wrong about their look. Providing a link to the
701original font file would be also a good idea. Try to do a little
702troublehooting and report its result. This not only would help with
703the fix but may also give you a temporary work-around for the bug.
704.PP
705First, enable full warnings with option \*(L'\fB\-W99\fR\*(R', save them to
706a file and read carefully. Sometimes the prolem is with a not implemented
707feature which is reported in the warnings. Still, reporting about such
708problems may be a good idea: some features were missed to cut corners,
709in hope that no real font is using them. So a report about a font using
710such a feature may motivate someone to implement it. Of course, you
711may be the most motivated person: after all, you are the one wishing
712to convert that font. ;\-) Seriously, the philosophy \*(L"scrath your own itch\*(R"
713seems to be the strongest moving force behind the Open Source software.
714.PP
715The next step is playing with the options. This serves a dual purpose:
716on one hand, it helps to localize the bug, on the other hand you may be
717able to get a working version of the font for the meantime while the
718bug is being fixed. The typical options to try out are: first \*(L'\fB\-Ou\fR\*(R', if
719it does not help then \*(L'\fB\-Os\fR\*(R', then \*(L'\fB\-Oh\fR\*(R', then \*(L'\fB\-Oo\fR\*(R'.
720They are described in a bit more detail above. Try them one by one
721and in combinations. See if with them the resulting fonts look better.
722.PP
723On some fonts ttf2pt1 just crashes. Commonly that happens because the
724font being converted is highly defective (although sometimes the bug
725is in ttf2pt1 itself). In any case it should not crash, so the reports
726about such cases will help to handle these defects properly in future.
727.PP
728We try to respond to the bug reports in a timely fashion but alas, this
729may not always be possible, especially if the problem is complex.
730This is a volunteer project and its resources are limited. Because
731of this we would appreciate bug reports as detailed as possible,
732and we would appreciate the ready fixes and contributions even more.
733.SH "HISTORY"
734Based on ttf2pfa by Andrew Weeks, and help from Frank Siegert.
735.PP
736Modification by Mark Heath.
737.PP
738Further modification by Sergey Babkin.
739.PP
740The Type1 assembler by I. Lee Hetherington with modifications by
741Kai-Uwe Herbing.
742
743.rn }` ''
744.IX Title "TTF2PT1 1"
745.IX Name "TTF2PT1 - A True Type to PostScript Type 1 Font Converter"
746
747.IX Header "NAME"
748
749.IX Header "SYNOPSIS"
750
751.IX Header "DESCRIPTION"
752
753.IX Header "OPTIONS"
754
755.IX Item "\(bu"
756
757.IX Item "\(bu"
758
759.IX Item "\(bu"
760
761.IX Item "\(bu"
762
763.IX Item "\(bu"
764
765.IX Item "\(bu"
766
767.IX Item "\(bu"
768
769.IX Item "\(bu"
770
771.IX Item "\(bu"
772
773.IX Item "\(bu"
774
775.IX Item "\(bu"
776
777.IX Item "\(bu"
778
779.IX Item "\(bu"
780
781.IX Item "\(bu"
782
783.IX Item "\(bu"
784
785.IX Item "\(bu"
786
787.IX Header "EXAMPLES"
788
789.IX Header "FILES"
790
791.IX Item "\(bu"
792
793.IX Item "\(bu"
794
795.IX Item "\(bu"
796
797.IX Item "\(bu"
798
799.IX Item "\(bu"
800
801.IX Item "\(bu"
802
803.IX Header "SEE ALSO"
804
805.IX Item "\(bu"
806
807.IX Item "\(bu"
808
809.IX Item "\(bu"
810
811.IX Item "\(bu"
812
813.IX Item "\(bu"
814
815.IX Item "\(bu"
816
817.IX Header "BUGS"
818
819.IX Subsection "Troubleshooting and bug reports"
820
821.IX Header "HISTORY"
822
Note: See TracBrowser for help on using the repository browser.