summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/man/man5/luaotfload.conf.5
blob: 8285e71d7d6d8f1b822e04d82f8457fe621f8129 (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
.\" Man page generated from reStructuredText.
.
.TH LUAOTFLOAD.CONF 5 "2021-05-21" "3.18" "text processing"
.SH NAME
luaotfload.conf \- Luaotfload configuration file
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.INDENT 0.0
.IP \(bu 2
\fB\&./luaotfload{.conf,rc}\fP
.IP \(bu 2
\fBXDG_CONFIG_HOME/luaotfload/luaotfload{.conf,rc}\fP
.IP \(bu 2
\fB~/.luaotfloadrc\fP
.UNINDENT
.SH DESCRIPTION
.sp
The file \fBluaotfload.conf\fP contains configuration options for
\fILuaotfload\fP, a font loading and font management component for LuaTeX.
.SH EXAMPLE
.sp
A small Luaotfload configuration file with few customizations could
look as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[db]
    formats = afm,ttf
    compress = false

[misc]
    termwidth = 60

[run]
    log\-level = 6
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This will make Luaotfload ignore all font files except for PostScript
binary fonts with a matching AFM file, and Truetype fonts. Also, an
uncompressed index file will be dumped which is going to be much larger
than the default gzip’ed index. The terminal width
is truncated to 60 characters which influences the verbose output
during indexing. Finally, the verbosity is increased greatly: each font
file being processed will be printed to the stdout on a separate line,
along with lots of other information.
.sp
To observe the difference in behavior, save above snippet to
\fB\&./luaotfload.conf\fP and update the font index:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
luaotfload\-tool \-\-update \-\-force
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The current configuration can be written to disk using
\fBluaotfload\-tool\fP:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
luaotfload\-tool \-\-dumpconf > luaotfload.conf
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The result can itself be used as a configuration file.
.SH SYNTAX
.sp
The configuration file syntax follows the common INI format. For a more
detailed description please refer to the section “CONFIGURATION FILE”
of \fBgit\-config\fP(1). A brief list of rules is given below:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
Blank lines and lines starting with a semicolon (\fB;\fP) are ignored.
.IP \(bu 2
A configuration file is partitioned into sections that are declared
by specifying the section title in brackets on a separate line:
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
[some\-section]
\&... section content ...
.ft P
.fi
.UNINDENT
.UNINDENT
.IP \(bu 2
Sections consist of one or more variable assignments of the form
\fBvariable\-name = value\fP  E. g.:
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
[foo]
    bar = baz
    quux = xyzzy
    ...
.ft P
.fi
.UNINDENT
.UNINDENT
.IP \(bu 2
Section and variable names may contain only uppercase and lowercase
letters as well as dashes (\fB\-\fP).
.UNINDENT
.UNINDENT
.UNINDENT
.SH VARIABLES
.sp
Variables in belong into a configuration section and their values must
be of a certain type. Some of them have further constraints. For
example, the “color callback” must be a string of one of the values
\fBpost_linebreak_filter\fP, \fBpre_linebreak_filter\fP, or
\fBpre_output_filter\fP, defined in the section \fIrun\fP of the
configuration file.
.sp
Currently, the configuration is organized into four sections:
.INDENT 0.0
.TP
.B db
Options relating to the font index.
.TP
.B misc
Options without a clearly defined category.
.TP
.B paths
Path and file name settings.
.TP
.B run
Options controlling runtime behavior of Luaotfload.
.UNINDENT
.sp
The list of valid variables, the sections they are part of and their
type is given below. Types represent Lua types that the values must be
convertible to; they are abbreviated as follows: \fBs\fP for the \fIstring\fP
type, \fBn\fP for \fInumber\fP, \fBb\fP for \fIboolean\fP\&. A value of \fBnil\fP means
the variable is unset.
.SS Section \fBdb\fP
.TS
center;
|l|l|l|.
_
T{
variable
T}	T{
type
T}	T{
default
T}
_
T{
compress
T}	T{
b
T}	T{
\fBtrue\fP
T}
_
T{
designsize\-dimen
T}	T{
b
T}	T{
\fBbp\fP
T}
_
T{
formats
T}	T{
s
T}	T{
\fB"otf,ttf,ttc"\fP
T}
_
T{
max\-fonts
T}	T{
n
T}	T{
\fB2^51\fP
T}
_
T{
scan\-local
T}	T{
b
T}	T{
\fBfalse\fP
T}
_
T{
skip\-read
T}	T{
b
T}	T{
\fBfalse\fP
T}
_
T{
strip
T}	T{
b
T}	T{
\fBtrue\fP
T}
_
T{
update\-live
T}	T{
b
T}	T{
\fBtrue\fP
T}
_
.TE
.sp
The flag \fBcompress\fP determines whether the font index (usually
\fBluaotfload\-names.lua[.gz]\fP will be stored in compressed forms.
If unset it is equivalent of passing \fB\-\-no\-compress\fP to
\fBluaotfload\-tool\fP\&. Since the file is only created for convenience
and has no effect on the runtime behavior of Luaotfload, the flag
should remain set. Most editors come with zlib support anyways.
.sp
The setting \fBdesignsize\-dimen\fP applies when looking up fonts from
families with design sizes. In Opentype, these are specified as
“decipoints” where one decipoint equals ten DTP style “big points”.
When indexing fonts these values are converted to \fBsp\fP\&. In order to
treat the values as though they were specified in TeX points or Didot
points, set \fBdesignsize\-dimen\fP to \fBpt\fP or \fBdd\fP\&.
.sp
The list of \fBformats\fP must be a comma separated sequence of strings
containing one or more of these elements:
.INDENT 0.0
.IP \(bu 2
\fBotf\fP               (OpenType format),
.IP \(bu 2
\fBttf\fP and \fBttc\fP       (TrueType format),
.IP \(bu 2
\fBafm\fP               (Adobe Font Metrics),
.UNINDENT
.sp
It corresponds loosely to the \fB\-\-formats\fP option to
\fBluaotfload\-tool\fP\&. Invalid or duplicate members are ignored; if the
list does not contain any useful identifiers, the default list
\fB"otf,ttf,ttc"\fP will be used.
.sp
The variable \fBmax\-fonts\fP determines after processing how many font
files the font scanner will terminate the search. This is useful for
debugging issues with the font index and has the same effect as the
option \fB\-\-max\-fonts\fP to \fBluaotfload\-tools\fP\&.
.sp
The \fBscan\-local\fP flag, if set, will incorporate the current working
directory as a font search location. NB: This will potentially slow
down document processing because a font index with local fonts will not
be saved to disk, so these fonts will have to be re\-indexed whenever
the document is built.
.sp
The \fBskip\-read\fP flag is only useful for debugging: It makes
Luaotfload skip reading fonts. The font information for rebuilding the
index is taken from the presently existing one.
.sp
Unsetting the \fBstrip\fP flag prevents Luaotfload from removing data
from the index that is only useful when processing font files. NB: this
can increase the size of the index files significantly and has no
effect on the runtime behavior.
.sp
If \fBupdate\-live\fP is set, Luaotfload will reload the database if it
cannot find a requested font. Those who prefer to update manually using
\fBluaotfload\-tool\fP should unset this flag. This option does not affect
rebuilds due to version mismatch.
.SS Section \fBdefault\-features\fP
.sp
By default Luaotfload enables \fBnode\fP mode and picks the default font
features that are prescribed in the OpenType standard. This behavior
may be overridden in the \fBdefault\-features\fP section. Global defaults
that will be applied for all scripts can be set via the \fBglobal\fP
option, others by the script they are to be applied to. For example,
a setting of
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[default\-features]
    global = mode=base,color=0000FF
    dflt   = smcp,onum
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
would force \fIbase\fP mode, tint all fonts blue and activate small
capitals and text figures globally. Features are specified as a comma
separated list of variables or variable\-value pairs. Variables without
an explicit value are set to \fBtrue\fP\&.
.SS Section \fBmisc\fP
.TS
center;
|l|l|l|.
_
T{
variable
T}	T{
type
T}	T{
default
T}
_
T{
statistics
T}	T{
b
T}	T{
\fBfalse\fP
T}
_
T{
termwidth
T}	T{
n
T}	T{
\fBnil\fP
T}
_
T{
version
T}	T{
s
T}	T{
<Luaotfload version>
T}
_
.TE
.sp
With \fBstatistics\fP enabled, extra statistics will be collected during
index creation and appended to the index file. It may then be queried
at the Lua end or inspected by reading the file itself.
.sp
The value of \fBtermwidth\fP, if set, overrides the value retrieved by
querying the properties of the terminal in which Luatex runs. This is
useful if the engine runs with \fBshell_escape\fP disabled and the actual
terminal dimensions cannot be retrieved.
.sp
The value of \fBversion\fP is derived from the version string hard\-coded
in the Luaotfload source. Override at your own risk.
.SS Section \fBpaths\fP
.TS
center;
|l|l|l|.
_
T{
variable
T}	T{
type
T}	T{
default
T}
_
T{
cache\-dir
T}	T{
s
T}	T{
\fB"fonts"\fP
T}
_
T{
names\-dir
T}	T{
s
T}	T{
\fB"names"\fP
T}
_
T{
index\-file
T}	T{
s
T}	T{
\fB"luaotfload\-names.lua"\fP
T}
_
T{
lookups\-file
T}	T{
s
T}	T{
\fB"luaotfload\-lookup\-cache.lua"\fP
T}
_
.TE
.sp
The paths \fBcache\-dir\fP and \fBnames\-dir\fP determine the subdirectory
inside the Luaotfload subtree of the \fBluatex\-cache\fP directory where
the font cache and the font index will be stored, respectively.
.sp
Inside the index directory, the names of the index file and the font
lookup cache will be derived from the respective values of
\fBindex\-file\fP and \fBlookups\-file\fP\&. This is the filename base for the
bytecode compiled version as well as \-\- for the index \-\- the gzipped
version.
.SS Section \fBrun\fP
.TS
center;
|l|l|l|.
_
T{
variable
T}	T{
type
T}	T{
default
T}
_
T{
anon\-sequence
T}	T{
s
T}	T{
\fB"tex,path,name"\fP
T}
_
T{
color\-callback
T}	T{
s
T}	T{
\fB"post_linebreak_filter"\fP
T}
_
T{
definer
T}	T{
s
T}	T{
\fB"patch"\fP
T}
_
T{
log\-level
T}	T{
n
T}	T{
\fB0\fP
T}
_
T{
resolver
T}	T{
s
T}	T{
\fB"cached"\fP
T}
_
T{
fontloader
T}	T{
s
T}	T{
\fB"default"\fP
T}
_
.TE
.sp
Unqualified font lookups are treated with the flexible “anonymous”
mechanism. This involves a chain of lookups applied successively until
the first one yields a match. By default, the lookup will first search
for TFM fonts using the Kpathsea library. If this wasn’t successful, an
attempt is made at interpreting the request as an absolute path (like
the \fB[/path/to/font/foo.ttf]\fP syntax) or a file name
(\fBfile:foo.ttf\fP). Finally, the request is interpreted as a font name
and retrieved from the index (\fBname:Foo Regular\fP). This behavior can
be configured by specifying a list as the value to \fBanon\-sequence\fP\&.
Available items are \fBtex\fP, \fBpath\fP, \fBname\fP \-\- representing the
lookups described above, respectively \-\-, and \fBfile\fP for searching a
filename but not an absolute path. Also, \fBmy\fP lookups are valid
values but they should only be used from within TeX documents, because
there is no means of customizing a \fBmy\fP lookups on the command line.
.sp
The \fBcolor\-callback\fP option determines the stage at which fonts that
defined with a \fBcolor=xxyyzz\fP feature will be colorized. By default
this happens in a \fBpost_linebreak_filter\fP but alternatively the
\fBpre_linebreak_filter\fP or \fBpre_output_filter\fP may be chosen, which
is faster but might produce inconsistent output. The
\fBpre_output_filter\fP used to be the default in the 1.x series of
Luaotfload, whilst later versions up to and including 2.5 hooked into
the \fBpre_linebreak_filter\fP which naturally didn’t affect any glyphs
inserting during hyphenation. Both are kept around as options to
restore the previous behavior if necessary.
.sp
The \fBdefiner\fP allows for switching the \fBdefine_font\fP callback.
Apart from the default \fBpatch\fP one may also choose the \fBgeneric\fP
one that comes with the vanilla fontloader. Beware that this might
break tools like Fontspec that rely on the \fBpatch_font\fP callback
provided by Luaotfload to perform important corrections on font data.
.sp
The fontloader backend can be selected by setting the value of
\fBfontloader\fP\&. The most important choices are \fBdefault\fP, which will
load the dedicated Luaotfload fontloader, and \fBreference\fP, the
upstream package as shipped with Luaotfload. Other than those, a file
name accessible via kpathsea can be specified.
.sp
Alternatively, the individual files that constitute the fontloader can
be loaded directly. While less efficient, this greatly aids debugging
since error messages will reference the actual line numbers of the
source files and explanatory comments are not stripped. Currently,
three distinct loading strategies are available: \fBunpackaged\fP will
load the batch that is part of Luaotfload. These contain the identical
source code that the reference fontloader has been compiled from.
Another option, \fBcontext\fP will attempt to load the same files by
their names in the Context format from the search path. Consequently
this option allows to use the version of Context that comes with the
TeX distribution. Distros tend to prefer the stable version (“current”
in Context jargon) of those files so certain bugs encountered in the
more bleeding edge Luaotfload can be avoided this way. A third option
is to use \fBcontext\fP with a colon to specify a directory prefix where
the \fITEXMF\fP is located that the files should be loaded from, e. g.
\fBcontext:~/context/tex/texmf\-context\fP\&. This can be used when
referencing another distribution like the Context minimals that is
installed under a different path not indexed by kpathsea.
.sp
The value of \fBlog\-level\fP sets the default verbosity of messages
printed by Luaotfload. Only messages defined with a verbosity of less
than or equal to the supplied value will be output on the terminal.
At a log level of five Luaotfload can be very noisy. Also, printing too
many messages will slow down the interpreter due to line buffering
being disabled (see \fBsetbuf\fP(3)).
.sp
The \fBresolver\fP setting allows choosing the font name resolution
function: With the default value \fBcached\fP Luaotfload saves the result
of a successful font name request to a cache file to speed up
subsequent lookups. The alternative, \fBnormal\fP circumvents the cache
and resolves every request individually. (Since to the restructuring of
the font name index in Luaotfload 2.4 the performance difference
between the cached and uncached lookups should be marginal.)
.SH FILES
.sp
Luaotfload only processes the first configuration file it encounters at
one of the search locations. The file name may be either
\fBluaotfload.conf\fP or \fBluaotfloadrc\fP, except for the dotfile in the
user’s home directory which is expected at \fB~/.luaotfloadrc\fP\&.
.sp
Configuration files are located following a series of steps. The search
terminates as soon as a suitable file is encountered. The sequence of
locations that Luaotfload looks at is
.INDENT 0.0
.IP i. 5
The current working directory of the LuaTeX process.
.IP ii. 5
The subdirectory \fBluaotfload/\fP inside the XDG configuration
tree, e. g. \fB/home/oenothea/config/luaotfload/\fP\&.
.IP iii. 5
The dotfile.
.IP iv. 5
The \fITEXMF\fP (using kpathsea).
.UNINDENT
.SH SEE ALSO
.sp
\fBluaotfload\-tool\fP(1), \fBluatex\fP(1), \fBlua\fP(1)
.INDENT 0.0
.IP \(bu 2
\fBtexdoc luaotfload\fP to display the PDF manual for the \fILuaotfload\fP
package
.IP \(bu 2
Luaotfload development \fI\%https://github.com/latex3/luaotfload\fP
.IP \(bu 2
LuaLaTeX mailing list  \fI\%http://tug.org/pipermail/lualatex\-dev/\fP
.IP \(bu 2
LuaTeX                 \fI\%http://luatex.org/\fP
.IP \(bu 2
Luaotfload on CTAN     \fI\%http://ctan.org/pkg/luaotfload\fP
.UNINDENT
.SH REFERENCES
.INDENT 0.0
.IP \(bu 2
The XDG base specification
\fI\%http://standards.freedesktop.org/basedir\-spec/basedir\-spec\-latest.html\fP\&.
.UNINDENT
.SH AUTHORS
.sp
\fILuaotfload\fP was developed by the LuaLaTeX dev team
(\fI\%https://github.com/lualatex/\fP). It is currently maintained by the
LaTeX Project Team at \fI\%https://github.com/latex3/luaotfload\fP
.sp
This manual page was written by Philipp Gesang <\fI\%phg@phi\-gamma.net\fP>.
.SH COPYRIGHT
GPL v2.0
.\" Generated by docutils manpage writer.
.