Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit ad48092

Browse files
committed
[doc] extend documentation of path lookups
1 parent 894e271 commit ad48092

File tree

1 file changed

+38
-11
lines changed

1 file changed

+38
-11
lines changed

Diff for: doc/luaotfload-main.tex

+38-11
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
<name character> ::= {\sc all_characters} - ( `(' | `/' | `:' ) ;
241241
\endsyntaxfloat
242242

243+
%% Below guarded space gets borked in index; why‽
243244
\beginsubsection{Prefix -- the \identifier{luaotfload}{ }Way}
244245

245246
In \identifier{luaotfload}, the canonical syntax for font requests
@@ -335,13 +336,12 @@
335336

336337
\endsubsection
337338

338-
\beginsubsection {Compatibility Layer}
339-
340-
In addition to the regular prefixed requests, \identifier{luaotfload}
341-
accepts loading fonts the \XETEX way.
339+
\beginsubsection {Bracketed Lookups}
340+
\label{sec:conf}
341+
Bracketed lookups allow for arbitrary character content to be used in a
342+
definition.
342343
%
343-
There are again two modes: bracketed and unbracketed.
344-
A bracketed request looks as follows.
344+
A simple bracketed request looks follows the scheme
345345

346346
\beginnarrower
347347
\nonproportional{\string\font\string\fontname\space = [}%
@@ -350,21 +350,41 @@
350350
\endnarrower
351351

352352
\noindent
353-
Inside the square brackets, every character except for a closing
354-
bracket is permitted, allowing for specifying paths to a font file.
353+
Inside the square brackets, every character except for a closing bracket is
354+
permitted, allowing for arbitrary paths to a font file -- including Windows
355+
style paths with UNC or drive letter prepended -- to be specified.
355356
%
357+
The \identifier{Luaotfload} syntax differs from \XETEX in that the subfont
358+
selector goes \emphasis{after} the closing bracket:
359+
360+
\beginnarrower
361+
\nonproportional{\string\font\string\fontname\space = [}%
362+
\meta{/path/to/file}%
363+
\nonproportional{]}
364+
\nonproportional{(}n\nonproportional{)}
365+
\endnarrower
366+
356367
Naturally, path-less file names are equally valid and processed the
357368
same way as an ordinary \inlinecode {file:} lookup.
358369

370+
\beginsubsection {Compatibility}
371+
372+
In addition to the regular prefixed requests, \identifier{luaotfload}
373+
accepts loading fonts the \XETEX way.
374+
%
375+
There are again two modes: bracketed and unbracketed.
376+
For the bracketed variety, see above, \ref{sec:conf}.
377+
378+
Unbracketed (or, for lack of a better word: \emphasis{anonymous})
379+
font requests resemble the conventional \TEX syntax.
380+
359381
\beginnarrower
360382
\nonproportional{\string\font\string\fontname\space= }%
361383
\meta{font name}
362384
\dots
363385
\endnarrower
386+
\endsubsection
364387

365-
Unbracketed (or, for lack of a better word: \emphasis{anonymous})
366-
font requests resemble the conventional \TEX syntax.
367-
%
368388
However, they have a broader spectrum of possible interpretations:
369389
before anything else, \identifier{luaotfload} attempts to load a
370390
traditional \TEX Font Metric (\abbrev{tfm} or \abbrev{ofm}).
@@ -443,6 +463,13 @@
443463
\font \cambriamath = "file:cambria.ttc(1)" at 10pt
444464
\endlisting
445465

466+
and likewise, requesting subfont inside a TTC container by path:
467+
468+
\beginlisting
469+
\font \asanamain = "[/home/typesetter/.fonts/math/asana.ttc](0):mode=node;+tlig" at 10pt
470+
\font \asanamath = "[/home/typesetter/.fonts/math/asana.ttc](1):mode=base" at 10pt
471+
\endlisting
472+
446473
\endsubsubsection
447474

448475
\beginsubsubsection{Loading by Font Name}

0 commit comments

Comments
 (0)