1MKFONTDIR(1)                General Commands Manual               MKFONTDIR(1)
2
3
4

NAME

6       mkfontdir - create an index of X font files in a directory
7

SYNOPSIS

9       mkfontdir  [-n]  [-x  suffix]  [-r] [-p prefix] [-e encoding-directory-
10       name] ...  [--] [directory-name ... ]
11

DESCRIPTION

13       For each directory argument, mkfontdir reads all of the font  files  in
14       the  directory searching for properties named "FONT", or (failing that)
15       the name of the file stripped of its suffix.  These  are  converted  to
16       lower case and used as font names, and, along with the name of the font
17       file, are written out to the file "fonts.dir" in the directory.  The  X
18       server and font server use "fonts.dir" to find font files.
19
20       The  kinds  of  font  files  read  by mkfontdir depend on configuration
21       parameters, but typically include  PCF  (suffix  ".pcf"),  SNF  (suffix
22       ".snf") and BDF (suffix ".bdf").  If a font exists in multiple formats,
23       mkfontdir will first choose PCF, then SNF and finally BDF.
24
25       The first line of fonts.dir gives the number of fonts in the file.  The
26       remaining lines list the fonts themselves, one per line, in two fields.
27       First is the name of the font file, followed by a space and the name of
28       the font.
29

SCALABLE FONTS

31       Because scalable font files do not usually include the X font name, the
32       file "fonts.scale" can be used to name the scalable fonts in the direc‐
33       tory.   The  fonts  listed  in it are copied to fonts.dir by mkfontdir.
34       "fonts.scale" has the same format as the "fonts.dir" file.
35

FONT NAME ALIASES

37       The file "fonts.alias", which can be put in any directory of the  font-
38       path,  is used to map new names to existing fonts, and should be edited
39       by hand.  The format is two white-space separated  columns,  the  first
40       containing aliases and the second containing font-name patterns.  Lines
41       beginning with "!" are comment lines and are ignored.
42
43       If neither the alias nor the value specifies the  size  fields  of  the
44       font  name,  this  is  a  scalable alias.  A font name of any size that
45       matches this alias will be mapped to the same size of the font that the
46       alias resolves to.
47
48       When  a  font  alias is used, the name it references is searched for in
49       the normal manner, looking through each font directory in  turn.   This
50       means  that the aliases need not mention fonts in the same directory as
51       the alias file.
52
53       To embed white space in either name, simply enclose it in  double-quote
54       marks;  to  embed  double-quote marks (or any other character), precede
55       them with back-slash:
56
57       "magic-alias with spaces"     "\"font name\" with quotes"
58       regular-alias            fixed
59
60       If the string "FILE_NAMES_ALIASES" stands alone on a line,  each  file-
61       name in the directory (stripped of its suffix) will be used as an alias
62       for that font.
63

ENCODING FILES

65       The option -e can be used to specify a directory with  encoding  files.
66       Every  such  directory is scanned for encoding files, the list of which
67       is then written to an "encodings.dir" file  in  every  font  directory.
68       The  "encodings.dir" file is used by the server to find encoding infor‐
69       mation.
70
71       The "encodings.dir" file has the same format as "fonts.dir".   It  maps
72       encoding names (strings of the form CHARSET_REGISTRY-CHARSET_ENCODING )
73       to encoding file names.
74

OPTIONS

76       The following options are supported:
77
78       -e     Specify a directory containing encoding files.   The  -e  option
79              may  be specified multiple times, and all the specified directo‐
80              ries will be read.  The order of the entries is significant,  as
81              encodings  found  in earlier directories override those in later
82              ones; encoding files in the same directory are discriminated  by
83              preferring compressed versions.
84
85       -n     do  not scan for fonts, do not write font directory files.  This
86              option is useful when generating encoding directories only.
87
88       -p     Specify a prefix that is prepended to  the  encoding  file  path
89              names  when  they  are written to the "encodings.dir" file.  The
90              prefix is prepended as-is.  If a `/'  is  required  between  the
91              prefix  and  the  path  names, it must be supplied explicitly as
92              part of the prefix.
93
94       -r     Keep non-absolute encoding directories in  their  relative  form
95              when  writing  the "encodings.dir" file.  The default is to con‐
96              vert relative encoding directories to  absolute  directories  by
97              prepending  the  current  directory.   The  positioning  of this
98              options is significant, as this option only  applies  to  subse‐
99              quent -e options.
100
101       -x suffix
102              Ignore fonts files of type suffix.
103
104       --     End options.
105

FILES

107       fonts.dir      List  of  fonts  in the directory and the files they are
108                      stored in.  Created by mkfontdir.  Read by the X  server
109                      and  font  server  each  time  the font path is set (see
110                      xset(1)).
111
112       fonts.scale    List of scalable fonts in the directory.   Contents  are
113                      copied to fonts.dir by mkfontdir.
114
115       fonts.alias    List  of  font  name  aliases.  Read by the X server and
116                      font  server  each  time  the  font  path  is  set  (see
117                      xset(1)).
118
119       encodings.dir  List  of  known  encodings and the files they are stored
120                      in.  Created by mkfontdir.  Read by  the  X  server  and
121                      font  server each time a font with an unknown charset is
122                      opened.
123

SEE ALSO

125       X(7), Xserver(1), xfs(1), xset(1)
126
127
128
129X Version 11                    mkfontdir 1.0.3                   MKFONTDIR(1)
Impressum