summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-23 23:49:58 +0000
committerKarl Berry <karl@freefriends.org>2010-05-23 23:49:58 +0000
commit64ba2a9dbcc524178aec8cecbb6947b449724990 (patch)
tree6da81cb5f197163c244c4fb30af9221f538193d6 /Master/texmf-dist/source
parentbdbf5181624ab958acf8225d0fc3c95b9894c5ea (diff)
luaotfload update
git-svn-id: svn://tug.org/texlive/trunk@18437 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/Makefile19
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx408
2 files changed, 238 insertions, 189 deletions
diff --git a/Master/texmf-dist/source/luatex/luaotfload/Makefile b/Master/texmf-dist/source/luatex/luaotfload/Makefile
index 63d389bb1b4..6a1363073dc 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/Makefile
+++ b/Master/texmf-dist/source/luatex/luaotfload/Makefile
@@ -9,12 +9,13 @@ OTFL = $(wildcard otfl-*.lua)
COMPILED = $(DOC)
UNPACKED = luaotfload.sty luaotfload.lua
GENERATED = $(COMPILED) $(UNPACKED)
-SOURCE = $(DTX) $(OTFL) README Makefile News
+SOURCE = $(DTX) $(OTFL) README Makefile NEWS mkluatexfontdb.lua
# Files grouped by installation location
-RUNFILES = $(UNPACKED) $(OTFL)
-DOCFILES = $(DOC) README News
-SRCFILES = $(DTX) Makefile
+SCRIPTFILES = mkluatexfontdb.lua
+RUNFILES = $(UNPACKED) $(OTFL)
+DOCFILES = $(DOC) README NEWS
+SRCFILES = $(DTX) Makefile
# The following definitions should be equivalent
# ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES)
@@ -22,9 +23,10 @@ ALL_FILES = $(GENERATED) $(SOURCE)
# Installation locations
FORMAT = luatex
-RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
-DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
-SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
+SCRIPTDIR = $(TEXMFROOT)/scripts/mkluatexfontdb
+RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
+DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
+SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
TEXMFROOT = ./texmf
CTAN_ZIP = $(NAME).zip
@@ -57,6 +59,7 @@ $(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
@zip -9 $@ $^ >/dev/null
define run-install
+@mkdir -p $(SCRIPTDIR) && cp $(SCRIPTFILES) $(SCRIPTDIR)
@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
@@ -84,7 +87,7 @@ manifest:
@for f in $(GENERATED); do echo $$f; done
clean:
- @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg
+ @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out
mrproper: clean
@$(RM) -- $(GENERATED) $(ZIPS)
diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
index 1160f80cc03..8c2de488978 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
+++ b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
@@ -34,7 +34,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luaotfload 2010/02/22 v1.06b ConTeXt font loading system}
+\Msg{* Package: luaotfload 2010/05/10 v1.07 ConTeXt font loading system}
\Msg{************************************************************************}
\keepsilent
@@ -99,11 +99,18 @@ and the derived files
%</ignore>
%<*driver>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{luaminimalotf.drv}%
- [2010/02/22 v1.06b ConTeXt font loading system]%
+\ProvidesFile{luaotfload.drv}%
+ [2010/05/10 v1.07 ConTeXt font loading system]%
\documentclass{ltxdoc}
+\usepackage{metalogo,multicol,mdwlist,fancyvrb}
+\usepackage[colorlinks=true]{hyperref}
+
+\def\LuaTeX{Lua\TeX}
+\def\ConTeXt{Con\TeX t}
+
\EnableCrossrefs
\CodelineIndex
+\VerbatimFootnotes
\begin{document}
\DocInput{luaotfload.dtx}%
\end{document}
@@ -131,55 +138,163 @@ and the derived files
% \GetFileInfo{luaotfload.drv}
%
% \title{The \textsf{luaotfload} package}
-% \date{2010/02/22 v1.06b}
-% \author{Elie Roux \\ \texttt{elie.roux@telecom-bretagne.eu}}
+% \date{2010/05/10 v1.07}
+% \author{ Elie Roux \footnote{\texttt{elie.roux@telecom-bretagne.eu}}
+% \and Khaled hosny \footnote{\texttt{khaledhosny@eglug.org}}}
%
% \maketitle
%
% \begin{abstract}
-% Con\TeX t font loading system, providing the possibility to load OTF fonts
-% with a lot of features, and the Xe\TeX\ font loading syntax.
+% Adaptation of \ConTeXt\ font loading system, providing the ability to load
+% \textsf{OpenType} fonts with a lot of features, and extended font loading
+% syntax.
% \end{abstract}
%
% \tableofcontents
%
% \section{Documentation}
-%
+%
% \subsection{Introduction}
%
% Font management and installation has always been painful with \TeX\ (and
-% even more with \LaTeX ). A lot of files are needed for one font (tfm, pfb,
+% even more with \LaTeX). A lot of files are needed for one font (tfm, pfb,
% map, fd, vf), and they are limited to 256 characters. But the font world has
% evolved since, and new standard types of fonts have appeared, like
-% \textsf{truetype} or \textsf{opentype} fonts. These fonts can contain a lot
+% \textsf{TrueType} and \textsf{OpenType} fonts. These fonts can contain a lot
% of characters, and have some functionalities (ligatures, old-style numbers,
% small capitals, etc.). They are everywhere, as the system fonts and most
% modern text softwares fonts are of this type. Until now the (almost) only
-% way to use them with \TeX\ was to use them with Xe\TeX .
+% way to use them with \TeX\ was to use them with \XeTeX .
%
-% Unlike Xe\TeX , Lua\TeX\ does not provide facilities for these fonts by
+% Unlike \XeTeX , \LuaTeX\ does not provide facilities for these fonts by
% default, but it provides a way to hook lua code in some points of the \TeX\
% algorithm, for instance we can improve the font loading system; this is what
% we do in this package.
%
% This package is quite low-level, and should be loaded directly in the macro
-% package, like it is in Con\TeX t. Sadly, Plain and \LaTeX\ are frozen and
-% it's even impossible to adapt them to the new engines.
+% package, like it is in \ConTeXt. Sadly, Plain and \LaTeX\ are frozen and
+% it's even impossible to adapt them to the new engines.
+%
+% \subsection{Loading fonts}
+%
+% \textsf{luaotfload} supports an extended font loading syntax which looks like:
+%
+% \begin{center}
+% |\font\foo={|\meta{prefix}|:|\meta{font name}|:|\meta{font features}|}| \meta{\TeX\ font features}
+% \end{center}
+%
+% The curly brackets are optional and are used for escaping spaces in font names
+% (\XeTeX-like double quotes can also used for the same purpose).
+%
+% \paragraph{Prefix}
+%
+% Can be either \texttt{file:} or \texttt{name:} and are used to select between
+% filename based or font name based search mechanisms.
+% Loading fonts based on filename is restricted to files found by
+% \textsf{kpathsea} (typically in the \textsc{texmf} tree). Surrounding font
+% name with square brackets is synonym to using \texttt{file:} prefix (for
+% compatibility with \XeTeX).
+% This is usually used for loading old \textsc{tfm} fonts.
+% Accessing fonts by fontname allows loading system installed fonts as well as
+% \textsc{texmf} ones, and requires a font names database that can be generated
+% using the bundled |mkluatexfontdb.lua| script.
+% \footnote{run |mkluatexfontdb.lua --help| for help and usage information}
+%
+% If no prefix is specified, then \texttt{file:} is assumed.
+%
+% \paragraph{Font name}
+%
+% Font name can be either a font filename or actual font name; based on the
+% prefix specified.
+%
+% \paragraph{Font features}
+%
+% Font features are a semicolon separated list of items, which are either
+% |key=value| font parameters, or switches to enable/disable certain font
+% features, in the form of |+feat|/|-feat|.
+% The supported keys are:
+% \begin{description}
+% \item [mode] \hfill \\
+% \textsf{luaotfload} has two OpenType processing modes; \texttt{base} mode
+% which supports only a subset of OpenType features and works by mapping those
+% features to traditional \TeX\ ligaturing and kerning mechanisms and is a bit
+% faster, and \texttt{node} mode which, hopefully, supports OpenType fully and
+% works by direct processing of node list at lua end and is a bit slower.
+% Note that \texttt{node} mode doesn't work inside math.
+%
+% By default, \texttt{base} mode is used, however it is advisable to always
+% enable \texttt{node} made, except for math fonts, otherwise many OpenType
+% features will not function properly or even not work at all, especially for
+% advanced scripts like Arabic.
+%
+% \item [script] \hfill \\
+% OpenType script string, default value is |dflt|. Some fonts don't assign
+% features to |dflt| script, in this case script need to be set explicitly.
+%
+% \item [language] \hfill \\ OpenType language string, default value is |latn|.
+%
+% \item [featurefile] \hfill \\
+% feature files are textual representation of OpenType tables and can be used to
+% extend OpenType features of the font on fly. The file name of the feature file
+% is passed, then features defined in the file can be enabled/disabled like any
+% other feature. The actual syntax is described at
+% \url{http://fontforge.sourceforge.net/featurefile.html} and
+% \url{http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html}.
+%
+% For example, to set a |tkrn| feature from |mykern.fea| file:
+%
+% |\font\lmr=Latin Modern Roman:featurefile=mykern.fea;+tkrn|
%
-% \subsection{Con\TeX t files needed}
+% \item [color] \hfill \\
+% font color, defined as a triplet of two-digit Hex RGB values, with optionally
+% another value for the transparency (where |00| is completely transparent and
+% |FF| is opaque.)
%
-% This package is a wrapper for several files taken from the Con\TeX t macro
-% package. The philosophy is to let Con\TeX t do all the implementation and
+% For example, to set text in semitransparent red:
+%
+% |\font\lmr=Latin Modern Roman:color=FF0000BB|
+%
+% \item [protrusion \& expansion] \hfill \\
+% Both keys control microtypographic features of the font, namely glyph
+% protrusion and expansion. The value of the key is the name of predefined
+% lua tables of protrusion and expansion values, see the bottom of
+% \texttt{otfl-font-dum.lua} file for an example of such tables. The only
+% predefined value is |default|.
+%
+% For example, to enable default protrusion\footnote{You also need to set
+% |\pdfprotrudechars2 \pdfadjustspacing2| to activate protrusion and expansion,
+% respectively. See PDF\TeX\ manual for details}:
+%
+% |\font\lmr=Latin Modern Roman:protrusion=default|
+%
+% \end{description}
+%
+% \subparagraph{Non-standard font features}
+% \textsf{luaotfload} defines some additional font feature not defined in
+% OpenType, currently three features are defined:
+%
+% \begin{itemize*}
+% \item \texttt{anum}: replaces European numbers with eastern Arabic numbers or
+% Persian numbers, depending on the value of |language|.
+% \item \texttt{tlig}: applies legacy \TeX\ ligatures (|``''-- -- !` ?` <<>>|).
+% \item \texttt{trep}: applies legacy \TeX\ replacements (|`'"|).
+% \end{itemize*}
+%
+% \subsection{\ConTeXt\ files needed}
+%
+% This package is a wrapper for several files taken from the \ConTeXt\ macro
+% package. The philosophy is to let \ConTeXt\ do all the implementation and
% update these files from time to time. To do so we did not modify the files
-% taken from Con\TeX t, we only changed their names to prevent name clashes.
+% taken from \ConTeXt, we only changed their names to prevent name clashes.
% You can thus update the font system of this package simply by updating the
-% files taken from Con\TeX t, without (theorically) changing the \texttt{.sty}
+% files taken from \ConTeXt, without (theoretically) changing the \texttt{.sty}
% file nor the main \texttt{.lua} file.
%
-% The Con\TeX t files are renamed by adding the prefix \texttt{otfl-} to them
-% (\texttt{otfl} as \texttt{OTF L}oad).The files are:
+% The \ConTeXt\ files are renamed by adding the prefix \texttt{otfl-} to them
+% (\texttt{otfl} as \texttt{OTF L}oad). The files are:
%
-% \begin{itemize}
+% \begin{multicols}{3}
+% \begin{itemize*}
% \item \texttt{luat-dum.lua}
% \item \texttt{data-con.lua}
% \item \texttt{node-ini.lua}
@@ -201,16 +316,26 @@ and the derived files
% \item \texttt{font-xtx.lua}
% \item \texttt{font-map.lua}
% \item \texttt{font-dum.lua}
-% \end{itemize}
-%
+% \end{itemize*}
+% \end{multicols}
+%
% \subsection{Troubleshooting}
%
-% If you encounter problems with some fonts, please first update to the latest version of this package before reporting a bug, as this package is under active development.
+% If you encounter problems with some fonts, please first update to the latest
+% version of this package before reporting a bug, as this package is under
+% active development.
%
-% A very common problem is the lack of features for some otf fonts even when specified. It can be related to the fact that some fonts do not provide features for the |dflt| script, which is the default one in this package, so you may have to specify the script in the command line, for example:
+% A very common problem is the lack of features for some OpenType fonts
+% even when specified. It can be related to the fact that some fonts do not
+% provide features for the |dflt| script, which is the default one in this
+% package, so you may have to specify the script in the command line, for
+% example:
%
% |\font\myfont = MyFont.otf:script=latn;+liga;|
%
+% Also, some feature like contextual substitution, |calt|, will only work with
+% |node| mode.
+%
% \section{\texttt{luaotfload.lua}}
%
% \iffalse
@@ -220,138 +345,83 @@ and the derived files
% First some usual initializations.
%
% \begin{macrocode}
-luaotfload = { }
+module('luaotfload', package.seeall)
luaotfload.module = {
name = "luaotfload",
- version = 1.06,
- date = "2010/02/22",
+ version = 1.07,
+ date = "2010/05/10",
description = "ConTeXt font loading system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
license = "CC0"
}
-luatextra.provides_module(luaotfload.module)
+luatexbase.provides_module(luaotfload.module)
% \end{macrocode}
%
-% We load the Con\TeX t files with this function. It automatically adds the
-% \texttt{otfl-} prefix to it, so that we call it with the actual Con\TeX t
-% name.
-%
-% Some Con\TeX t files introduce incompatibilities with old Lua\TeX s, thus
-% the old versions of these files are kept under the name |otfl-compat-...|
-% and are called according to the version. The only file in this case
-% is a |font-otf.lua| that, in version 2009.11.26 of Con\TeX t generates
-% invalid PDFs with Lua\TeX{} older than version 0.45.
+% Some helper functions.
%
% \begin{macrocode}
+local format = string.format
-function luaotfload.loadmodule(name, compat)
- local tofind
- if compat then
- if tex.luatexversion < 45 then
- tofind = 'otfl-compat-'..name
- else
- tofind = 'otfl-'..name
- end
- else
- tofind = 'otfl-'..name
- end
- local found = kpse.find_file(tofind,"tex")
- if not found then
- luatextra.module_error('luaotfload', string.format('file %s not found.', tofind))
- return
- end
- luatextra.module_log('luaotfload', "loading file "..found)
- dofile(found)
+local function log(...)
+ luatexbase.module_log ('luaotfload', format(...))
+end
+
+local function error(...)
+ luatexbase.module_error ('luaotfload', format(...))
+end
+
+local function warning(...)
+ luatexbase.module_warning('luaotfload', format(...))
end
% \end{macrocode}
%
-% The following functions are made to map Con\TeX t functions to
-% \textsf{luaextra} functions.
+% The minimal required \LuaTeX\ version.
%
% \begin{macrocode}
-string.strip = string.stripspaces
+local luatex_version = 60
-file = fpath
-file.extname = fpath.suffix
+if tex.luatexversion < luatex_version then
+ warning('LuaTeX v%.2f is old, v%.2f is recommended.',
+ tex.luatexversion/100,
+ luatex_version /100)
+end
% \end{macrocode}
%
-% These are small functions that are not already in \textsf{luatextra}.
+% We load the \ConTeXt\ files with this function. It automatically adds the
+% \texttt{otfl-} prefix to it, so that we call it with the actual \ConTeXt\
+% name.
%
% \begin{macrocode}
-local splitters_s, splitters_m = { }, { }
-
-function lpeg.splitat(separator,single)
- local splitter = (single and splitters_s[separator]) or splitters_m[separator]
- if not splitter then
- separator = lpeg.P(separator)
- if single then
- local other, any = lpeg.C((1 - separator)^0), lpeg.P(1)
- splitter = other * (separator * lpeg.C(any^0) + "")
- splitters_s[separator] = splitter
- else
- local other = lpeg.C((1 - separator)^0)
- splitter = other * (separator * other)^0
- splitters_m[separator] = splitter
- end
- end
- return splitter
-end
-
-function table.compact(t)
- if t then
- for k,v in next, t do
- if not next(v) then
- t[k] = nil
- end
- end
- end
-end
-
-function table.sortedhashkeys(tab) -- fast one
- local srt = { }
- for key,_ in next, tab do
- srt[#srt+1] = key
- end
- table.sort(srt)
- return srt
-end
-
-function table.reverse_hash(h)
- local r = { }
- for k,v in next, h do
- r[v] = string.lower(string.gsub(k," ",""))
- end
- return r
-end
-
-function table.reverse(t)
- local tt = { }
- if #t > 0 then
- for i=#t,1,-1 do
- tt[#tt+1] = t[i]
- end
+function luaotfload.loadmodule(name)
+ local tofind = 'otfl-'..name
+ local found = kpse.find_file(tofind,"tex")
+ if found then
+ log('loading file %s.', found)
+ dofile(found)
+ else
+ error('file %s not found.', tofind)
end
- return tt
end
% \end{macrocode}
%
% We start loading some lua files. These two are some code not used by
-% Con\TeX t at all that allow other modules to be used, it provides some
-% low-level Con\TeX t functions.
+% \ConTeXt\ at all that allow other modules to be used, it provides some
+% low-level \ConTeXt\ functions.
%
% \begin{macrocode}
luaotfload.loadmodule('luat-dum.lua') -- not used in context at all
+luaotfload.loadmodule('luat-ovr.lua') -- override some luat-dum functions
luaotfload.loadmodule('data-con.lua') -- maybe some day we don't need this one
% \end{macrocode}
@@ -364,7 +434,7 @@ luaotfload.loadmodule('node-ini.lua')
% \end{macrocode}
%
-% By default Con\TeX t takes some private attributes for internal use. With
+% By default \ConTeXt\ takes some private attributes for internal use. With
% Plain and \LaTeX\ we can't do so, we use |\newluaattribute|. This
% functions overrides a function defined in the previous module that
% returns the number of a private attribute. We allocate new attributes in
@@ -375,9 +445,11 @@ luaotfload.loadmodule('node-ini.lua')
% \begin{macrocode}
function attributes.private(name)
- local number = tex.attributenumber['otfl@'..name]
- if not number then
- luatextra.module_error('luaotfload', string.format('asking for attribute %s, but not declared. Please report to the maintainer of luaotfload.', name))
+ local number = luatexbase.attributes['otfl@'..name]
+ if not number then
+ error('asking for attribute %s, but not declared. '
+ ..'Please report to the maintainer of luaotfload.',
+ name)
end
return number
end
@@ -386,9 +458,9 @@ end
%
% Some more modules. We don't load neither \texttt{font-enc.lua} nor
% \texttt{font-afm.lua} as it will never be used here.
-%
-% We also remove a warning from \texttt{font-fnt.lua} as it not relevant
-% with Lua\TeX{}tra.
+%
+% We also remove a warning from \texttt{node-fnt.lua} as it is \ConTeXt\
+% specific.
%
% \begin{macrocode}
@@ -402,78 +474,52 @@ luaotfload.loadmodule('node-dum.lua')
luaotfload.loadmodule('font-ini.lua')
luaotfload.loadmodule('font-tfm.lua')
luaotfload.loadmodule('font-cid.lua')
+luaotfload.loadmodule('font-map.lua')
luaotfload.loadmodule('font-ott.lua')
-luaotfload.loadmodule('font-otf.lua', 1)
+luaotfload.loadmodule('font-otf.lua')
luaotfload.loadmodule('font-otd.lua')
luaotfload.loadmodule('font-oti.lua')
luaotfload.loadmodule('font-otb.lua')
luaotfload.loadmodule('font-otn.lua')
luaotfload.loadmodule('font-ota.lua')
luaotfload.loadmodule('font-otc.lua')
-
-% \end{macrocode}
-%
-% \texttt{font-def.lua} calls the function \texttt{callback.register} to
-% register its callbacks. We override it with a dumb function so that it
-% does not register any callback. We will register the callbacks later.
-%
-% \begin{macrocode}
-
-do
- local temp = callback.register
- callback.register = function (...)
- return
- end
- luaotfload.loadmodule('font-def.lua')
- callback.register = temp
-end
-
+luaotfload.loadmodule('font-def.lua')
luaotfload.loadmodule('font-xtx.lua')
-luaotfload.loadmodule('font-map.lua')
luaotfload.loadmodule('font-dum.lua')
+luaotfload.loadmodule('font-nms.lua')
+luaotfload.loadmodule('font-clr.lua')
% \end{macrocode}
%
-% This is a small patch that prevents errors in some \LaTeX\ files.
-%
-% \begin{macrocode}
-
-fonts.enc.known = {}
-
-% \end{macrocode}
-%
-% We have to register a function in the |find_vf_file| callback in order to make everything work.
-%
-% \begin{macrocode}
-
-function luaotfload.find_vf_file(name)
- name = file.removesuffix(file.basename(name))
- local result = kpse.find_file(name, "vf") or ""
- if result == "" then
- result = kpse.find_file(name, "ovf") or ""
- end
- return result
-end
-
-% \end{macrocode}
-%
-% Finally two functions
+% Finally two functions
%
% \begin{macrocode}
function luaotfload.register_callbacks()
- callback.add('pre_linebreak_filter', nodes.simple_font_handler, 'luaotfload.pre_linebreak_filter')
- callback.add('hpack_filter', nodes.simple_font_handler, 'luaotfload.hpack_filter')
- callback.reset('define_font')
- callback.add('define_font', fonts.define.read, 'luaotfload.define_font', 1)
- callback.add('find_vf_file', luaotfload.find_vf_file, 'luaotfload.find_vf_file')
+ luatexbase.add_to_callback('pre_linebreak_filter',
+ nodes.simple_font_handler,
+ 'luaotfload.pre_linebreak_filter')
+ luatexbase.add_to_callback('hpack_filter',
+ nodes.simple_font_handler,
+ 'luaotfload.hpack_filter')
+ luatexbase.reset_callback('define_font')
+ luatexbase.add_to_callback('define_font',
+ fonts.define.read,
+ 'luaotfload.define_font', 1)
+ luatexbase.add_to_callback('find_vf_file',
+ fonts.vf.find,
+ 'luaotfload.find_vf_file')
end
function luaotfload.unregister_callbacks()
- callback.remove('pre_linebreak_filter', 'luaotfload.pre_linebreak_filter')
- callback.remove('hpack_filter', 'luaotfload.hpack_filter')
- callback.remove('define_font', 'luaotfload.define_font')
- callback.remove('find_vf_file', 'luaotfload.find_vf_file')
+ luatexbase.remove_from_callback('pre_linebreak_filter',
+ 'luaotfload.pre_linebreak_filter')
+ luatexbase.remove_from_callback('hpack_filter',
+ 'luaotfload.hpack_filter')
+ luatexbase.remove_from_callback('define_font',
+ 'luaotfload.define_font')
+ luatexbase.remove_from_callback('find_vf_file',
+ 'luaotfload.find_vf_file')
end
% \end{macrocode}
% \iffalse
@@ -497,7 +543,7 @@ end
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2010/02/22 v1.06b ConTeXt font loading system]
+ [2010/05/10 v1.07 ConTeXt font loading system]
\RequirePackage{luatextra}
\fi
@@ -532,11 +578,11 @@ end
% \begin{macrocode}
\def\otfl@off{
-\luadirect{luaotfload.unregister_callbacks()}
+\directlua{luaotfload.unregister_callbacks()}
}
\def\otfl@on{
-\luadirect{luaotfload.register_callbacks()}
+\directlua{luaotfload.register_callbacks()}
}
% \end{macrocode}