diff options
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r-- | luaotfload.dtx | 414 |
1 files changed, 291 insertions, 123 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx index 595a9fa..3685083 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -130,13 +130,14 @@ and the derived files \setsansfont[Ligatures=TeX,Scale=MatchLowercase]{Iwona Medium} %setmathfont{XITS Math} -\newcommand\TEX {\TeX\xspace} -\newcommand\LUA {Lua\xspace} -\newcommand\PDFTEX {pdf\TeX\xspace} -\newcommand\LUATEX {Lua\TeX\xspace} -\newcommand\XETEX {\XeTeX\xspace} -\newcommand\LATEX {\LaTeX\xspace} -\newcommand\CONTEXT{Con\TeX t\xspace} +\newcommand\TEX {\TeX\xspace} +\newcommand\LUA {Lua\xspace} +\newcommand\PDFTEX {pdf\TeX\xspace} +\newcommand\LUATEX {Lua\TeX\xspace} +\newcommand\XETEX {\XeTeX\xspace} +\newcommand\LATEX {\LaTeX\xspace} +\newcommand\CONTEXT {Con\TeX t\xspace} +\newcommand\OpenType{\identifier{Open\kern-.25ex Type}\xspace} \def\definehighlight[#1][#2]% {\ifcsname #1\endcsname\else @@ -192,24 +193,26 @@ and the derived files % \maketitle % % \begin{abstract} -% This package is an adaptation of the \CONTEXT font loading system, providing -% the ability to load \identifier{OpenType} fonts with extended font loading syntax -% supporting a large selection of \identifier{OpenType} font features. +% This package is an adaptation of the \CONTEXT font loading system. +% It allows for loading \OpenType fonts with an extended syntax and adds +% support for a variety of font features. % \end{abstract} % % \tableofcontents % +% \part{Package Description} +% % \section{Introduction} % % Font management and installation has always been painful with \TEX. A lot of % files are needed for one font (\abbrev{tfm}, \abbrev{pfb}, \abbrev{map}, -% \abbrev{fd}, \abbrev{vf}), and as \TEX is 8-bit each font is limited to 256 -% characters. +% \abbrev{fd}, \abbrev{vf}), and due to the 8-Bit encoding each font is limited +% to 256 characters. % But the font world has evolved since the original % \TEX, and new typographic systems have appeared, most notably the so -% called \emphasis{smart font} technologies like \identifier{OpenType} -% (\abbrev{otf}) fonts. -% These fonts can contain a lot of characters and additional +% called \emphasis{smart font} technologies like \OpenType +% fonts (\abbrev{otf}). +% These fonts can contain many more characters than \TEX fonts, as well as additional % functionality like ligatures, old-style numbers, small capitals, % etc., and support more complex writing systems like Arabic and % Indic\footnote{% @@ -219,7 +222,7 @@ and the derived files % appreciated. % } % scripts. -% \identifier{OpenType} fonts are widely deployed and available for all +% \OpenType fonts are widely deployed and available for all % modern operating systems. % As of 2013 they have become the de facto standard for advanced text % layout. @@ -227,12 +230,17 @@ and the derived files % world was with the \XETEX engine. % % Unlike \XETEX, \LUATEX has no built-in support for -% \identifier{OpenType} or other technologies. -% Instead, it provides hooks for executing Lua during the \TEX run +% \OpenType or technologies other than the original \TEX fonts. +% Instead, it provides hooks for executing \LUA code during the \TEX run % that allow implementing extensions for loading fonts and manipulating % how input text is processed without modifying the underlying engine. +% This is where \identifier{luaotfload} comes into play: +% Based on code from \CONTEXT, it extends \LUATEX with functionality necessary +% for handling \OpenType fonts. +% Additionally, it provides means for accessing fonts known to the operating +% system conveniently by indexing the metadata. % -% \section{Loading fonts} +% \section{Loading Fonts} % % \identifier{luaotfload} supports an extended font loading syntax: % @@ -252,7 +260,7 @@ and the derived files % \paragraph{Prefix} % % The \meta{prefix} is either |file:| or |name:|. -% It determines whether font loader should interpret the request as a +% It determines whether the font loader should interpret the request as a % file name or font name, respectively, which again influences how it % will attempt to locate the font. % The prefix can be omitted, in which case |name:| is assumed. @@ -266,30 +274,89 @@ and the derived files %% For compatibility with \XETEX, surrounding the \meta{font name} with %% square brackets is synonymous to using the |file:| prefix. % -% Accessing fonts by fontname allows loading system installed fonts as -% well as \fileent{texmf} ones, and requires a font names database; see -% Section~\ref{sec:fontdb} for more information. +% In order for fonts installed both in system locations and in your +% \fileent{texmf} to be accessible by font name, \identifier{luaotfload} must +% first collect the metadata included in the files. +% Please refer to section ~\ref{sec:fontdb} below for instructions on how to +% create the database. % % \paragraph{Font name} % % The \meta{font name} can be either a font filename or actual font % name based on the \meta{prefix} as mentioned above. % -% Fonts loaded by filename may either include their absolute path in -% the filesystem or consist of just the filename without a path. If no -% path is specified, then \identifier{kpathsea} is used to locate the +% A filename request may optionally include the absolute path to the font file, +% allowing for fonts outside the standard locations to be loaded as well. +% If no path is specified, then \identifier{kpathsea} is used to locate the % font (which will typically be in the \fileent{texmf} tree or the % current directory). % -% For example, +% \subparagraph{Examples for loading by file name} +% +% For example, conventional \abbrev{type1} font can be loaded with a \verb|file:| +% request like so: +% % \begin{quote} -% \begin{verbatim} -% \font\1={file:ec-lmr10} at 10pt -% \font\2={/Users/Shared/Fonts/aldus.otf} at 11pt -% \font\3={name:TeX Gyre Pagella} at 9pt -% \end{verbatim} +% \begin{verbatim} +% \font\lmromanten={file:ec-lmr10} at 10pt +% \end{verbatim} % \end{quote} % +% The \OpenType version of Janusz Nowacki’s font \emphasis{Antykwa +% Półtawskiego} (in \TEX Live) in its condensed variant can be loaded as +% follows: +% +% \begin{quote} +% \begin{verbatim} +% \font\apcregular=file:antpoltltcond-regular.otf at 42pt +% \end{verbatim} +% \end{quote} +% +% The next example shows how to load the \emphasis{Porson} font digitized by +% the Greek Font Society using \XETEX-style syntax and an absolute path from a +% non-standard directory: +% +% \begin{quote} +% \begin{verbatim} +% \font\gfsporson="[/tmp/GFSPorson.otf]" at 12pt +% \end{verbatim} +% \end{quote} +% +% \subparagraph{Examples for loading by font name} +% +% The \verb|name:| lookup does not depend on cryptic filenames: +% +% \begin{quote} +% \begin{verbatim} +% \font\pagellaregular={name:TeX Gyre Pagella} at 9pt +% \end{verbatim} +% \end{quote} +% +% A bit more specific but essentially the same lookup would be: +% +% \begin{quote} +% \begin{verbatim} +% \font\pagellaregular={name:TeX Gyre Pagella Regular} at 9pt +% \end{verbatim} +% \end{quote} +% +% Which fits nicely with the whole set: +% +% \begin{quote} +% \begin{verbatim} +% \font\pagellaregular ={name:TeX Gyre Pagella Regular} at 9pt +% \font\pagellaitalic ={name:TeX Gyre Pagella Italic} at 9pt +% \font\pagellabold ={name:TeX Gyre Pagella Bold} at 9pt +% \font\pagellabolditalic={name:TeX Gyre Pagella Bolditalic} at 9pt +% +% {\pagellaregular foo bar baz\endgraf} +% {\pagellaitalic foo bar baz\endgraf} +% {\pagellabold foo bar baz\endgraf} +% {\pagellabolditalic foo bar baz\endgraf} +% +% ... +% \end{verbatim} +% \end{quote} % % \paragraph{Font features} % @@ -298,10 +365,14 @@ and the derived files % Cf. \url{http://www.microsoft.com/typography/otspec/featurelist.htm}. % } % and font options. -% Prepending a font feature with a |+|-sign enables it, while -% a |-| disables it. For instance, the request +% Prepending a font feature with a |+| (plus sign) enables it, whereas +% a |-| (minus) disables it. For instance, the request % -% |\font\test=Latin Modern Roman:+clig;-kern| +% \begin{quote} +% \begin{verbatim} +% \font\test=LatinModernRoman:+clig;-kern +% \end{verbatim} +% \end{quote} % % \noindent activates contextual ligatures (|clig|) and disables % kerning (|kern|). @@ -309,35 +380,45 @@ and the derived files % the feature in a key/value expression. % The following request has the same meaning as the last one: % -% |\font\test=Latin Modern Roman:clig=true;kern=false| +% \begin{quote} +% \begin{verbatim} +% \font\test=LatinModernRoman:clig=true;kern=false +% \end{verbatim} +% \end{quote} % % \noindent -% Furthermore, this second syntax is required if a font feature -% accepts options besides its activation state. -% For example, \emphasis{stylistic alternates} (|salt|) provide a set -% of variants to given glyphs. -% These can be selected either explicitly by supplying the variant -% index (starting from 1), or randomly by setting the value to, -% obviously, |random|: -% -% |\font\test=Latin Modern Roman:salt=1| +% Furthermore, this second syntax is required should a font feature +% accept other options besides a true/false switch. +% For example, \emphasis{stylistic alternates} (|salt|) are variants of given +% glyphs. +% They can be selected either explicitly by supplying the variant +% index (starting from one), or randomly by setting the value to, +% obviously, |random|. +% +% \iffalse TODO verify that this actually works with a font that supports +% the salt/random feature!\fi +% \begin{quote} +% \begin{verbatim} +% \font\librmsaltfirst=LatinModernRoman:salt=1 +% \end{verbatim} +% \end{quote} % % \noindent Other font options include: % % \begin{description} % % \item [mode] \hfill \\ -% \identifier{luaotfload} has two \identifier{OpenType} processing +% \identifier{luaotfload} has two \OpenType processing % \emphasis{modes}: % \identifier{base} and \identifier{node}. % -% \identifier{base} mode works by mapping \identifier{OpenType} -% features to traditional \TEX ligature and kerning mechanisms, -% thus supporting only non-contextual substitutions and kerning -% pairs, but is the slightly faster variant. -% \identifier{node} mode works by processing \TEX’s internal +% \identifier{base} mode works by mapping \OpenType +% features to traditional \TEX ligature and kerning mechanisms. +% Supporting only non-contextual substitutions and kerning +% pairs, it is the slightly faster, albeit somewhat limited, variant. +% \identifier{node} mode works by processing \TeX’s internal % node list directly at the \LUA end and supports -% a wider range of \identifier{OpenType} features. +% a wider range of \OpenType features. % The downside is that the intricate operations required for % \identifier{node} mode may slow down typesetting especially % with complex fonts and it does not work in math mode. @@ -346,19 +427,20 @@ and the derived files % mode, and \identifier{base} mode has to be requested where needed, % e.~g. for math fonts. % -% \item [script] \ref{script-tag} \hfill \\ -% An \identifier{OpenType} script tag;\footnote{% +% \item [script] \label{script-tag} \hfill \\ +% An \OpenType script tag;\footnote{% % See \url{http://www.microsoft.com/typography/otspec/scripttags.htm} % for a list of valid values. % For scripts derived from the Latin alphabet the value % |latn| is good choice. % } % the default value is |dlft|. -% Some fonts do not assign features to the |dflt| script, in +% Some fonts, including very popular ones by foundries like Adobe, +% do not assign features to the |dflt| script, in % which case the script needs to be set explicitly. % % \item [language] \hfill \\ -% An \identifier{OpenType} language system identifier,\footnote{% +% An \OpenType language system identifier,\footnote{% % Cf. \url{http://www.microsoft.com/typography/otspec/languagetags.htm}. % } % defaulting to |dflt|. @@ -367,13 +449,13 @@ and the derived files % A comma-separated list of feature files to be applied to the % font. % Feature files contain a textual representation of -% \identifier{OpenType} tables and extend the features of a font +% \OpenType tables and extend the features of a font % on fly. % After they are applied to a font, features defined in a % feature file can be enabled or disabled just like any % other font feature. % The syntax is documented in \identifier{Adobe}’s -% \identifier{OpenType} Feature File Specification.\footnote{% +% \OpenType Feature File Specification.\footnote{% % Cf. \url{http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html}. % } % @@ -391,13 +473,17 @@ and the derived files % % For example, in order to set text in semitransparent red: % -% |\font\test=Latin Modern Roman:color=FF0000BB| +% \begin{quote} +% \begin{verbatim} +% \font\test={Latin Modern Roman}:color=FF0000BB +% \end{verbatim} +% \end{quote} % % \item [protrusion \& expansion] \hfill \\ -% These keys both control microtypographic features of the font, +% These keys control microtypographic features of the font, % namely \emphasis{character protrusion} and \emphasis{font % expansion}. -% They accept names of predefined \LUA tables that contain +% Their arguments are names of \LUA tables that contain % values for the respective features.\footnote{% % For examples of the table layout please refer to the % section of the file \fileent{otfl-fonts-ext.lua} where the @@ -423,12 +509,16 @@ and the derived files % for details. % }: % -% |\font\test=Latin Modern Roman:protrusion=default| +% \begin{quote} +% \begin{verbatim} +% \font\test=LatinModernRoman:protrusion=default +% \end{verbatim} +% \end{quote} % \end{description} % % \paragraph{Non-standard font features} -% \identifier{luaotfload} add a number of features that are not defined -% in the original \identifier{OpenType} specification, most of them +% \identifier{luaotfload} adds a number of features that are not defined +% in the original \OpenType specification, most of them % aiming at emulating the behavior familiar from other \TEX engines. % Currently (2013) there are three of them: % @@ -441,7 +531,15 @@ and the derived files % % \item [tlig] % Applies legacy \TEX ligatures: -% |``|, |''|, |`|, |'|, |"|, |--|, |---|, |!`| and |?`|.% +% +% \begin{tabular}{rlrl} +% `` & \verb|``| & '' & \verb|''| \\ +% ` & \verb|`| & ' & \verb|'| \\ +% " & \verb|"| & -- & \verb|--| \\ +% --- & \verb|---| & !` & \verb|!`| \\ +% ?` & \verb|?`| & & \\ +% \end{tabular} +% % \footnote{% % These contain the feature set \verb|trep| of earlier % versions of \identifier{luaotfload}. @@ -463,16 +561,16 @@ and the derived files % % As mentioned above, \identifier{luaotfload} keeps track of which % fonts are available to \LUATEX by means of a \emphasis{database}. -% This allows loading not only by explicit filenames but also by the -% proper names contained in the metadata which is often more accessible -% to humans.\footnote{% +% This allows referring to fonts not only by explicit filenames but +% also by the proper names contained in the metadata which is often +% more accessible to humans.\footnote{% % The tool \href{http://www.lcdf.org/type/}{\fileent{otfinfo}} (comes -% with \TEX Live), when invoked on a font file with the \verb|-o| +% with \TEX Live), when invoked on a font file with the \verb|-i| % option, lists the variety of name fields defined for it. % } % -% When \identifier{luaotfload} is asked to load a font by font name, it -% will check if the database exists and load it or else generate a +% When \identifier{luaotfload} is asked to load a font by a font name, +% it will check if the database exists and load it, or else generate a % fresh one. % Should it then fail to locate the font, an update to the database is % performed in case the font has been added to the system only @@ -482,16 +580,22 @@ and the derived files % behave as unobtrusively as possible, while providing a convenient % interface to the fonts installed on the system. % -% \subsection[mkluatexfontdb.lua]% -% {\fileent{mkluatexfontdb.lua}\footnote{% +% Generating the database for the first time may take a while since it +% inspects every font file on your computer. +% This is particularly noticeable if it occurs during a typesetting run. +% In any case, subsequent updates to the database will be quite fast. +% +% \subsection[fontdbutil / mkluatexfontdb.lua]% +% {\fileent{fontdbutil} / +% \fileent{mkluatexfontdb.lua}\footnote{% % The script may be named just \fileent{mkluatexfontdb} in your % distribution. % }} % -% However, it can be desirable at times to do some of these steps -% manually. +% It can still be desirable at times to do some of these steps +% manually, and without having to compile a document. % To this end, \identifier{luaotfload} comes with the utility -% \fileent{mkluatexfontdb} that offers an interface to the database +% \fileent{fontdbutil} that offers an interface to the database % functionality. % Being a \LUA script, there are two ways to run it: % either make it executable (\verb|chmod +x| on unixoid systems) or @@ -499,27 +603,39 @@ and the derived files % Tests by the maintainer show only marginal performance gain by % running with Luigi Scarso’s % \href{https://foundry.supelec.fr/projects/luajittex/}% -% {\LUA jit\TEX}, +% {\identifier{Luajit\kern-.25ex\TEX}}, % which is probably due to the fact that most of the time is spent % on file system operations. % % \emphasis{Note}: % On \abbrev{MS} \identifier{Windows} systems, the script can be run % either by calling the wrapper application -% \fileent{mkluatexfontdb.exe} or as -% \verb|texlua.exe mkluatexfontdb.lua|. +% \fileent{fontdbutil.exe} or as +% \verb|texlua.exe fontdbutil|. % } -% Invoke it from the command line with the \verb|--force| switch to -% initiate a complete rebuild of the database. +% Invoked with the argument \verb|--update| it will perform a database +% update, scanning for fonts not indexed. % -% \begin{verbatim} -% mkluatexfontdb --force -% \end{verbatim} +% \begin{quote} +% \begin{verbatim} +% fontdbutil --update +% \end{verbatim} +% \end{quote} % -% Generating the database for the first time may take a while since it -% inspects every font file on your computer. -% This is particularly noticeable if it occurs during a typesetting run. -% In any case, subsequent updates to the database will be quite fast. +% Adding the \verb|--force| switch will initiate a complete +% rebuild of the database. +% +% \begin{quote} +% \begin{verbatim} +% fontdbutil --update --force +% \end{verbatim} +% \end{quote} +% +% For sake of backwards compatibility, \fileent{fontdbutil} may be +% renamed or symlinked to \fileent{mkluatexfontdb}. +% Whenever it is run under this name, it will update the database +% first, mimicking the behavior of earlier versions of +% \identifier{luaotfload}. % % \subsection{Search Paths} % @@ -548,9 +664,9 @@ and the derived files % Windows & \verb|%WINDIR%\Fonts| % \\ % Linux & \fileent{/usr/local/etc/fonts/fonts.conf} and\hfill\break -% \fileent{/etc/fonts/fonts.conf"} +% \fileent{/etc/fonts/fonts.conf} % \\ -% Mac & \fileent{~/Library/Fonts},\break +% Mac & \fileent{\textasciitilde/Library/Fonts},\break % \fileent{/Library/Fonts},\break % \fileent{/System/Library/Fonts}, and\hfill\break % \fileent{/Network/Library/Fonts} @@ -561,49 +677,70 @@ and the derived files % \hrule % \end{table} % -% \subsection{Querying from outside} +% \subsection{Querying from Outside} % -% \fileent{mkluatexfontdb.lua} also provides rudimentary means of -% accessing the font database. -% If the option \verb|--find=name| is given, the script will try and search -% the fonts indexed by \identifier{luaotfload} for a matching name. +% \fileent{fontdbutil} also provides rudimentary means of +% accessing the information collected in the font database. +% If the option \verb|--find=|\emphasis{name} is given, the script will +% try and search the fonts indexed by \identifier{luaotfload} for a +% matching name. % For instance, the invocation % -% \begin{verbatim} -% mkluatexfontdb.lua --find="Iwona Regular" -% \end{verbatim} +% \begin{quote} +% \begin{verbatim} +% fontdbutil --find="Iwona Regular" +% \end{verbatim} +% \end{quote} % +% \noindent % will verify if “Iwona Regular” is found in the database and can be % readily requested in a document. % -% If you are unsure about the actual font name, then you can add the -% \verb|-F| switch to the command line to enable approximate matching. +% If you are unsure about the actual font name, then add the +% \verb|-F| (or \verb|--fuzzy|) switch to the command line to enable +% approximate matching. % Suppose you cannot precisely remember if the variant of % \identifier{Iwona} you are looking for was “Bright” or “Light”. % The query % -% \begin{verbatim} -% mkluatexfontdb.lua -F --find="Iwona Bright" -% \end{verbatim} +% \begin{quote} +% \begin{verbatim} +% fontdbutil -F --find="Iwona Bright" +% \end{verbatim} +% \end{quote} % +% \noindent % will tell you that indeed the latter name is correct. % -% \verb|mkluatexfontdb.lua --help| will list the available command line -% switches, including some that will not be discussed in detail here. +% Basic information about fonts in the database can be displayed +% using the \verb|-i| option (\verb|--info|). +% \begin{quote} +% \begin{verbatim} +% fontdbutil -F --find="Iwona Light Italic" +% \end{verbatim} +% \end{quote} +% \noindent +% The meaning of the printed values is described in section 4.4 of the +% \LUATEX reference manual.\footnote{% +% In \TEX Live: \fileent{texmf-dist/doc/luatex/base/luatexref-t.pdf}. +% } +% +% \verb|fontdbutil --help| will list the available command line +% switches, including some not discussed in detail here. % -% \subsection{Blacklisting fonts} +% \subsection{Blacklisting Fonts} % \label{font-blacklist} % % Some fonts are problematic in general, or just in \LUATEX. % If you find that compiling your document takes far too long or eats % away all your system’s memory, you can track down the culprit by -% running \verb|mkluatexfontdb -v| to increase verbosity. +% running \verb|fontdbutil -v| to increase verbosity. % Take a note of the \emphasis{filename} of the font that database % creation fails with and append it to the file % \fileent{otfl-blacklist.cnf}. % % A blacklist file is a list of font filenames, one per line. -% Specifying the full path where the file is located is optional, the +% Specifying the full path to where the file is located is optional, the % plain filename should suffice. % File extensions (\fileent{.otf}, \fileent{.ttf}, etc.) may be omitted. % Anything after a percent (|%|) character until the end of the line @@ -634,13 +771,13 @@ and the derived files % % \section{Files from \CONTEXT and \LUATEX-Fonts} % -% This package relies on code originally written by Hans +% \identifier{luaotfload} relies on code originally written by Hans % Hagen\footnote{% % The creator of the \href{http://wiki.contextgarden.net}{\CONTEXT} % format. % } % for and tested with \CONTEXT. -% \identifier{luaotfload} integrates the font loader as distributed in +% It integrates the font loader as distributed in % the \identifier{\LUATEX-Fonts} package. % The original \LUA source files have been combined using the % \fileent{mtx-package} script into a single, self-contained blob. @@ -653,7 +790,7 @@ and the derived files % The guiding principle is to let \CONTEXT/\LUATEX-Fonts take care of % the implementation, and update the imported code from time to time. % As maintainers, we aim at importing files from upstream essentially -% \emphasis{unmodified}, except for renaming the files to prevent name +% \emphasis{unmodified}, except for renaming them to prevent name % clashes. % This job has been greatly alleviated since the advent of % \LUATEX-Fonts, prior to which the individual dependencies had to be @@ -714,10 +851,10 @@ and the derived files % \end{itemize} % \end{multicols} % -% \normalitem The \emphasis{Font Loader} itself. +% \normalitem The \emphasis{font loader} itself. % These files have been written for -% \LUATEX-Fonts and are distributed along with -% \identifier{luaotfload}. +% \LUATEX-Fonts and they are distributed along +% with \identifier{luaotfload}. % \begin{multicols}{2} % \begin{itemize} % \incitem{luatex-basics-gen.lua} @@ -748,6 +885,16 @@ and the derived files % \end{multicols} % \end{itemize} % +% Note that if \identifier{luaotfload} cannot locate the +% merged file, it will load the individual \LUA libraries +% instead. +% Their names remain the same as in \CONTEXT (without the +% \verb|otfl|-prefix) since they are hard-coded in +% \fileent{otfl-fonts.lua}. +% Thus if you prefer running bleeding edge code from the +% \CONTEXT beta, all you have to do is remove +% \fileent{otfl-fonts-merged.lua} from the search path. +% % \end{itemize} % % In addition to these, \identifier{luaotfload} requires a number of @@ -766,9 +913,9 @@ and the derived files % \ouritem {otfl-lib-dir.lua} \fileent{l-dir} from \CONTEXT; % contains functionality required % by \fileent{otfl-font-nms.lua}. -% \ouritem {otfl-luat-ovr.lua} overrides for the \CONTEXT logging +% \ouritem {otfl-luat-ovr.lua} overrides the \CONTEXT logging % functionality. -% \ouritem {otfl-font-pfb.lua} registers the \identifier{OpenType} +% \ouritem {otfl-font-pfb.lua} registers the \OpenType % font reader as handler for % Postscript fonts. % \ouritem {otfl-font-nms.lua} font database. @@ -790,11 +937,12 @@ and the derived files % version of this package before reporting a bug, as % \identifier{luaotfload} is under active development and still a % moving target. +% % Errors during database generation can be traced by increasing % verbosity levels and redirecting log output to \fileent{stdout}: % % \begin{verbatim} -% mkluatexfontdb.lua -F -vvv --log=stdout +% fontdbutil -fuvvv --log=stdout % \end{verbatim} % % If this fails, the font last printed to the terminal is likely to be @@ -803,20 +951,40 @@ and the derived files % being (see above, page \pageref{font-blacklist}). % % A common problem is the lack of features for some -% \identifier{OpenType} fonts even when specified. +% \OpenType fonts even when specified. % This can be related to the fact that some fonts do not provide -% features for the |dflt| script (see above on page +% features for the \verb|dflt| script (see above on page % \pageref{script-tag}), % which is the default one in this package. -% If this happens, assigning a script when the font is defined should +% If this happens, assigning a noth script when the font is defined should % fix it. -% For example with the |latn| script: +% For example with \verb|latn|: % % \begin{verbatim} % \font\test=file:MyFont.otf:script=latn;+liga; % \end{verbatim} % -% \part{\fileent{luaotfload.lua}} +% \part{Implementation} +% +% \section{\fileent{luaotfload.lua}} +% +% This file initializes the system and loads the font loader. +% To minimize potential conflicts between other packages and the +% code imported from \CONTEXT, several precautions are in order. +% Some of the functionality that the font loader expects to be present, +% like raw access to callbacks, are assumed to have been disabled by +% \identifier{luatexbase} when this file is processed. +% In some cases it is possible to trick it by putting dummies into +% place and restoring the behavior from \identifier{luatexbase} after +% initilization. +% Other cases such as attribute allocation require that we hook the +% functionality from \identifier{luatexbase} into locations where they +% normally wouldn’t be. +% +% Anyways we can import the code base without modifications, which is +% due mostly to the extra effort by +% Hans Hagen to make \LUATEX-Fonts self-contained and encapsulate it, +% and especially due to his willingness to incorporate our suggestions. % % \iffalse %<*lua> @@ -1322,7 +1490,7 @@ loadmodule"features.lua" %</lua> % \fi % -% \part{\fileent{luaotfload.sty}} +% \section{\fileent{luaotfload.sty}} % % \iffalse %<*package> |