summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/ttf2pk/ttf2pk.txt
blob: 281dfb353b12a44359eadd568bcf45ea62add3c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
TTF2PK(1)                                                            TTF2PK(1)



NAME
       ttf2pk - convert a TrueType font into TeX's PK format

SYNOPSIS
       ttf2pk [-q] [-n] font-name resolution
       ttf2pk -t [-q] font-name
       ttf2pk --version | --help

DESCRIPTION
       This  program converts a TrueType font into a PK file; the created font
       can then be used with TeX or LaTeX.

       CJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts  as  created  by
       ttf2tfm are also supported.

       ttf2pk always assumes 10pt as the design size for the written TeX font.

PARAMETERS
       -q     This optional switch makes ttf2pk quiet.  It suppresses any  in-
              formational output except warning and error messages.

       -n     Use only `.pk' as the extension instead of `.<resolution>pk'.

       -t     Test  for  the existence of font-name.  Returns 0 on success and
              prints out the  corresponding  line  of  a  map  file  (default:
              ttfonts.map), provided the -q switch isn't set.

       font-name
              The  TeX  name  of the font.  ttf2pk looks this name up in a map
              file (see below) for further  information  how  to  process  the
              font.

       resolution
              The  resolution, given in dots per inch.  Currently the horizon-
              tal resolution is equal to the vertical resolution.  The  design
              size is always assumed to be 10pt.

       --version
              Shows the current version of ttf2pk and the used file search li-
              brary (e.g. kpathsea).

       --help Shows usage information.

       Environment variables for file searching are described  in  the  manual
       page of ttf2tfm.

THE CONFIGURATION FILE
       ttf2pk  uses a small configuration file called ttf2pk.cfg; in each line
       it contains a keyword with its value, separated by whitespace.  Comment
       lines  can  start  with any of the following characters: `*', `#', `;',
       and `%'.  Leading whitespace is ignored.

       Currently, only one keyword, `map', is  recognized  in  this  file;  it
       takes  a map file name as a parameter.  If no extension is given to the
       map file name, .map is appended.  No whitespace is allowed in  the  map
       file  name.   The  `map' keyword can be given more than once to specify
       multiple map files; if the map file name is prepended by a  plus  sign,
       it is added to the list of map files to be used.  Example:

         map  foo
         map +bar

       This makes ttf2pk to first read foo.map, then bar.map.

       If the configuration file is not found, ttf2pk tries to use ttfonts.map
       instead.

MAP FILES
       Parameters specified to ttf2tfm are preserved for ttf2pk in map files--
       ttf2tfm writes out to standard output, as the last line, a proper entry
       for a map file.

       As an example, a call to

         ttf2tfm arial -p T1.enc -s 0.25 -P 1 -E 0 arials

       will produce the following line:

         arials   arial Slant=0.25 Pid=1 Eid=0 Encoding=T1.enc

       See ttf2tfm(1) and afm2tfm(1) of the dvips package for a  detailed  de-
       scription of encoding files.

       Here a table listing the various ttf2tfm parameters and the correspond-
       ing entries in a map file:

           -s                  Slant
           -e                  Extend
           -p                  Encoding
           -f                  Fontindex
           -P                  Pid
           -E                  Eid
           -n                  PS=Yes
           -N                  PS=Only
           -R                  Replacement
           -x                  Rotate=Yes
           -y                  Y-Offset

       Single replacement glyph names given  to  ttf2tfm  with  `-r old-glyph-
       name new-glyphname'  are  directly  specified  with `old-glyphname=new-
       glyphname'.  They will be ignored if in subfont mode or if no  encoding
       file is given.

       One  additional parameter in a map file is unique to ttf2pk: `Hinting',
       which can take the values `On' or `Off'.  Some fonts (e.g. the CJK part
       of cyberbit.ttf) are rendered incorrectly if hinting is activated.  De-
       fault is `On' (you can also use `Yes', `No', `1', and `0').

       For  a  description  of   subfonts   (i.e.,   entries   of   the   form
       `<namestem>@<sfd-filename>@') please refer to ttf2tfm(1).

       The  format  of  a map file is simple.  Each line defines a font; first
       comes the TeX font name, then its TrueType font file name, followed  by
       the  parameters  in any order.  Case is significant (even for parameter
       names); the parameters are separated from its values by an equal  sign,
       with whitespace possibly surrounding it.  ttf2pk reads in all map files
       line by line in the order given in the configuration  file,  continuing
       until  the  TeX  font specified on the command line is found, otherwise
       the programs exits with error code 2.  Thus you can use  any  character
       invalid in a TeX font name to start a comment line.

       You  can  use `\' as the final character of a line to indicate that the
       input is continued on the next line.  The backslash and  the  following
       newline character will be removed.

       ttf2pk will abort if it can't find or read the TeX font metrics file of
       the given TeX font name.

RETURN VALUE
       If the call was successful, 0 will be returned.  In case of error,  the
       return  value  is 1.   Finally,  if  the font can't be found in the map
       files, 2 is returned.  This simplifies the  inclusion  of  ttf2pk  into
       scripts like mktexpk for automatic font generation.

SEE ALSO
       ttf2tfm(1), afm2tfm(1)

AVAILABILITY
       ttf2pk  is part of the FreeType 1 package, a high quality TrueType ren-
       dering library.

AUTHORS
       Werner LEMBERG <wl@gnu.org>
       Frédéric LOYER <loyer@ensta.fr>



FreeType version 1.5              10-Jan-2002                        TTF2PK(1)