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 pa‐
21       rameters, 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, and  can  be
35       created with the mkfontscale(1) program.
36

FONT NAME ALIASES

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

ENCODING FILES

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

OPTIONS

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

FILES

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

SEE ALSO

127       X(7), Xserver(1), mkfontscale(1), xfs(1), xset(1)
128
129
130
131X Version 11                   mkfontscale 1.2.2                  MKFONTDIR(1)
Impressum