summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luaotfload/NEWS6
-rw-r--r--Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdfbin168144 -> 99442 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua19
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/Makefile8
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx271
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua129
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua7
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otf.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua2
10 files changed, 204 insertions, 244 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/NEWS b/Master/texmf-dist/doc/luatex/luaotfload/NEWS
index ee579edf241..42e6e14efc5 100644
--- a/Master/texmf-dist/doc/luatex/luaotfload/NEWS
+++ b/Master/texmf-dist/doc/luatex/luaotfload/NEWS
@@ -1,6 +1,12 @@
Change History
--------------
+2011/04/21, luaotfload v1.25:
+ * Fix bug loading *.dfont fonts
+ * Misc. documentation fixes
+ * Fix the need to manually delete font cache when feature file is changed
+ * Hack to support Demi fonts
+
2011/02/16, luaotfload v1.24:
* Fix infinite loop first time creating a name list
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf
index 6c5329fa8bb..0933dc76100 100644
--- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf
+++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua b/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua
index dc46ac09c22..553332d4c7a 100755
--- a/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua
+++ b/Master/texmf-dist/scripts/luaotfload/mkluatexfontdb.lua
@@ -33,25 +33,6 @@ Valid options:
-V --version print version and exit
-h --help print this message
-Fonts are searched in directories on Windows or Linux that have been
-searched with fontconfig.
-
-On Mac OS X, only fonts located in the following standard font locations are
-included in the font database:
- ~/Library/Fonts /Library/Fonts
- /System/Library/Fonts /Network/Library/Fonts
-In particular, fonts installed in other locations with "Font Book" will not
-be available.
-
-Rather than using the fontconfig locations or, in Mac OS X, searching the
-default system font locations, you may specify where fonts are located by
-setting the OSFONTDIR environment variable. Doing so will override the use of
-fontconfig or scanning the system font locations. If you wish to continue to
-include them while also including other font locations, simply include them in
-the list. For example (using a bash shell),
-
- export OSFONTDIR='/path/to/other/fonts:/Users/will/Library/Fonts:...'
-
The output database file is named otfl-fonts.lua and is placed under:
%s"
diff --git a/Master/texmf-dist/source/luatex/luaotfload/Makefile b/Master/texmf-dist/source/luatex/luaotfload/Makefile
index ddf2f45ff81..c649875203f 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/Makefile
+++ b/Master/texmf-dist/source/luatex/luaotfload/Makefile
@@ -41,7 +41,7 @@ TDS_ZIP = $(NAME).tds.zip
ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
DO_TEX = tex --interaction=batchmode $< >/dev/null
-DO_PDFLATEX = pdflatex --interaction=batchmode $< >/dev/null
+DO_LATEX = lualatex --interaction=batchmode $< >/dev/null
DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) >/dev/null 2>&1
all: $(GENERATED)
@@ -52,10 +52,10 @@ tds: $(TDS_ZIP)
world: all ctan
$(COMPILED): $(DTX)
- $(DO_PDFLATEX)
+ $(DO_LATEX)
$(DO_MAKEINDEX)
- $(DO_PDFLATEX)
- $(DO_PDFLATEX)
+ $(DO_LATEX)
+ $(DO_LATEX)
$(UNPACKED): $(DTX)
$(DO_TEX)
diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
index 19286d52dc8..5bb9b6a3c90 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
+++ b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
@@ -36,7 +36,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luaotfload v1.24 OpenType layout system}
+\Msg{* Package: luaotfload v1.25 OpenType layout system}
\Msg{************************************************************************}
\keepsilent
@@ -104,10 +104,9 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luaotfload.drv}%
- [2011/02/16 v1.24 OpenType layout system]%
+ [2011/04/21 v1.25 OpenType layout system]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,mdwlist,fancyvrb,xcolor,xspace}
-\usepackage{charter}
\usepackage[
bookmarks=true,
colorlinks=true,
@@ -120,6 +119,12 @@ and the derived files
pdfkeywords={luatex, lualatex, unicode, opentype}
]{hyperref}
+\usepackage{fontspec}
+\usepackage{unicode-math}
+\setmainfont[Ligatures=TeX]{Linux Libertine O}
+\setsansfont[Ligatures=TeX]{Linux Biolinum O}
+\setmathfont{XITS Math}
+
\definecolor{niceblue}{rgb}{0.4,0.6,1.000}
\newcommand\tex {\TeX\xspace}
@@ -161,7 +166,7 @@ and the derived files
% \GetFileInfo{luaotfload.drv}
%
% \title{The \textsf{luaotfload} package}
-% \date{2011/02/16 v1.24}
+% \date{2011/04/21 v1.25}
% \author{Elie Roux and Khaled Hosny\\
% Support: \email{lualatex-dev@tug.org}}
%
@@ -212,12 +217,12 @@ and the derived files
%
% \paragraph{Prefix}
%
-% The \meta{prefix} be either \texttt{file:} or \texttt{name:}, which specify
+% The \meta{prefix} be either |file:| or |name:|, which specify
% whether to use a select the font from its filename or font name,
-% respectively. If no prefix is specified, then \texttt{file:} is assumed.
+% respectively. If no prefix is specified, then |file:| is assumed.
%
% For compatibility with \xetex, surrounding the \meta{font name}
-% with square brackets is synonymous to using the \texttt{file:} prefix.
+% with square brackets is synonymous to using the |file:| prefix.
%
% Accessing fonts by fontname allows loading system installed fonts as well as
% \textsc{texmf} ones, and requires a font names database; see
@@ -253,20 +258,15 @@ and the derived files
% The supported keys are:
% \begin{description}
% \item [mode] \hfill \\
-% \textsf{luaotfload} has two OpenType processing modes;
-% \texttt{base} or \texttt{node}.
-% Using \texttt{mode=base}
-% only supports a subset of OpenType features and works by mapping those
-% features to traditional \tex ligature and kerning mechanisms and is a bit
-% faster
-% Using \texttt{mode=node} hopefully supports OpenType fully and
-% works by direct processing of the node list with Lua; it is slower and
-% is not designed to work in math mode.
-%
-% By default \texttt{mode=base} is used, but 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.
+% \textsf{luaotfload} has two OpenType processing modes; |base| and |node|.
+% |base| mode works by mapping OpenType features to traditional \tex ligature
+% and kerning mechanisms, thus supporting only non-contextual substitutions and
+% kerning pairs, but is slightly faster. |node| works by direct processing of
+% the node list at Lua end and have more wide support of OpenType features but
+% can be slow especially with complex fonts and can't be used in math mode.
+%
+% By default |node| mode is used, and you have to manually force |base| mode
+% when needed e.g. for math fonts.
%
% \item [script] \hfill \\
% OpenType script string, default value is |dflt|. Some fonts don't assign
@@ -300,7 +300,7 @@ and the derived files
% 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 end of
-% \texttt{otfl-font-dum.lua} file for an example of such tables. The only
+% |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
@@ -316,14 +316,14 @@ and the derived files
% OpenType, currently three features are defined:
%
% \begin{itemize*}
-% \item \texttt{anum}: replaces European numbers with eastern Arabic numbers or
+% \item |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 (|`'"|).
+% \item |tlig|: applies legacy \tex ligatures (|``''-- -- !` ?` <<>>|).
+% \item |trep|: applies legacy \tex replacements (|`'"|).
% \end{itemize*}
%
% (For \xetex users: these last two are the equivalent of writing
-% \texttt{mapping=text-tex} using \xetex's input remapping feature.)
+% |mapping=text-tex| using \xetex's input remapping feature.)
%
%
% \section{Font names database}
@@ -389,39 +389,39 @@ and the derived files
% taken from \context as far as possible, but we changed their names to
% prevent name clashes.
%
-% The \context 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 |otfl-| to them
+% (|otfl| as |OTF L|oad). The files are:
%
% \begin{multicols}{3}
% \begin{itemize*}
-% \item \texttt{luat-dum.lua}
-% \item \texttt{data-con.lua}
-% \item \texttt{node-inj.lua}
-% \item \texttt{node-dum.lua}
-% \item \texttt{font-ini.lua}
-% \item \texttt{font-tfm.lua}
-% \item \texttt{font-cid.lua}
-% \item \texttt{font-ott.lua}
-% \item \texttt{font-otf.lua}
-% \item \texttt{font-otd.lua}
-% \item \texttt{font-oti.lua}
-% \item \texttt{font-otb.lua}
-% \item \texttt{font-otn.lua}
-% \item \texttt{font-ota.lua}
-% \item \texttt{font-otc.lua}
-% \item \texttt{font-def.lua}
-% \item \texttt{font-xtx.lua}
-% \item \texttt{font-map.lua}
-% \item \texttt{font-dum.lua}
+% \item |luat-dum.lua|
+% \item |data-con.lua|
+% \item |node-inj.lua|
+% \item |node-dum.lua|
+% \item |font-ini.lua|
+% \item |font-tfm.lua|
+% \item |font-cid.lua|
+% \item |font-ott.lua|
+% \item |font-otf.lua|
+% \item |font-otd.lua|
+% \item |font-oti.lua|
+% \item |font-otb.lua|
+% \item |font-otn.lua|
+% \item |font-ota.lua|
+% \item |font-otc.lua|
+% \item |font-def.lua|
+% \item |font-xtx.lua|
+% \item |font-map.lua|
+% \item |font-dum.lua|
% \end{itemize*}
% \end{multicols}
%
% The following files have been written for this package:
% \begin{multicols}{3}
% \begin{itemize*}
-% \item \texttt{font-clr.lua}
-% \item \texttt{font-nms.lua}
-% \item \texttt{luat-ovr.lua}
+% \item |font-clr.lua|
+% \item |font-nms.lua|
+% \item |luat-ovr.lua|
% \end{itemize*}
% \end{multicols}
%
@@ -439,9 +439,6 @@ and the derived files
%
% |\font\myfont = MyFont.otf:script=latn;+liga;|
%
-% Also remember to set |mode=node| as most OpenType features
-% (such as contextual substitution, |calt|), will not work without it.
-%
% \part{\texttt{luaotfload.lua}}
%
% \iffalse
@@ -451,12 +448,12 @@ and the derived files
% First some usual initializations.
%
% \begin{macrocode}
-module('luaotfload', package.seeall)
+module("luaotfload", package.seeall)
luaotfload.module = {
name = "luaotfload",
- version = 1.24,
- date = "2011/02/16",
+ version = 1.25,
+ date = "2011/04/21",
description = "OpenType layout system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
@@ -473,7 +470,7 @@ local error, warning, info, log = luatexbase.provides_module(luaotfload.module)
% fine even if |\pdfpkresolution| is changed.
%
% \begin{macrocode}
-kpse.init_prog('', 600, '/')
+kpse.init_prog("", 600, "/")
% \end{macrocode}
%
% The minimal required \luatex version.
@@ -482,7 +479,7 @@ kpse.init_prog('', 600, '/')
local luatex_version = 60
if tex.luatexversion < luatex_version then
- warning('LuaTeX v%.2f is old, v%.2f is recommended.',
+ warning("LuaTeX v%.2f is old, v%.2f is recommended.",
tex.luatexversion/100,
luatex_version /100)
end
@@ -491,18 +488,18 @@ end
% \subsection{Module loading}
%
% 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
+% |otfl-| prefix to it, so that we call it with the actual \context
% name.
%
% \begin{macrocode}
function luaotfload.loadmodule(name)
- local tofind = 'otfl-'..name
+ local tofind = "otfl-"..name
local found = kpse.find_file(tofind,"tex")
if found then
- log('loading file %s.', found)
+ log("loading file %s.", found)
dofile(found)
else
- error('file %s not found.', tofind)
+ error("file %s not found.", tofind)
end
end
% \end{macrocode}
@@ -512,12 +509,12 @@ end
% 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
+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}
%
-% A hack to remove a warning from \texttt{node-dum.lua} as it is \context
+% A hack to remove a warning from |node-dum.lua| as it is \context
% specific.
%
% \begin{macrocode}
@@ -527,9 +524,9 @@ tex.attribute[0] = 0
% Node support modules.
%
% \begin{macrocode}
-luaotfload.loadmodule('font-ini.lua')
-luaotfload.loadmodule('node-dum.lua')
-luaotfload.loadmodule('node-inj.lua')
+luaotfload.loadmodule("font-ini.lua")
+luaotfload.loadmodule("node-dum.lua")
+luaotfload.loadmodule("node-inj.lua")
% \end{macrocode}
%
% By default \context takes some private attributes for internal use. To
@@ -540,7 +537,7 @@ luaotfload.loadmodule('node-inj.lua')
%
% \begin{macrocode}
function attributes.private(name)
- local attr = 'otfl@' .. name
+ local attr = "otfl@" .. name
local number = luatexbase.attributes[attr]
if not number then
number = luatexbase.new_attribute(attr)
@@ -552,20 +549,20 @@ end
% Font handling modules.
%
% \begin{macrocode}
-luaotfload.loadmodule('font-tfm.lua')
-luaotfload.loadmodule('font-cid.lua')
-luaotfload.loadmodule('font-ott.lua')
-luaotfload.loadmodule('font-map.lua')
-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')
-luaotfload.loadmodule('font-def.lua')
-luaotfload.loadmodule('font-xtx.lua')
-luaotfload.loadmodule('font-dum.lua')
+luaotfload.loadmodule("font-tfm.lua")
+luaotfload.loadmodule("font-cid.lua")
+luaotfload.loadmodule("font-ott.lua")
+luaotfload.loadmodule("font-map.lua")
+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")
+luaotfload.loadmodule("font-def.lua")
+luaotfload.loadmodule("font-xtx.lua")
+luaotfload.loadmodule("font-dum.lua")
% \end{macrocode}
%
% This is a patch for |otfl-font-def.lua|, that defines a reader for ofm
@@ -581,8 +578,8 @@ end
% \textsf{luaotfload} specific modules.
%
% \begin{macrocode}
-luaotfload.loadmodule('font-nms.lua')
-luaotfload.loadmodule('font-clr.lua')
+luaotfload.loadmodule("font-nms.lua")
+luaotfload.loadmodule("font-clr.lua")
% \end{macrocode}
%
% \subsection{Post-processing TFM table}
@@ -604,38 +601,11 @@ local function def_font(...)
if type(fontdata) == "table" and fontdata.shared then
% \end{macrocode}
%
-% Here we add some code to emulate \xetex's \cs{fontdimen8},
-% which stores the caps-height of the font. (Cf.\ \cs{fontdimen5} which
-% stores the x-height.)
-%
-% Falls back to measuring the glyph if the font doesn't contain the
-% necessary information.
-% This needs to be extended for fonts that don't contain an `X'.
-%
-% XXX: move to \texttt{fontspec}.
-%
-% \begin{macrocode}
- local capheight
- local units = fontdata.units
- local size = fontdata.size
- local otfdata = fontdata.shared.otfdata
-
- if otfdata.pfminfo.os2_capheight > 0 then
- capheight = otfdata.pfminfo.os2_capheight / units * size
- else
- if fontdata.characters[string.byte("X")] then
- capheight = fontdata.characters[string.byte("X")].height
- else
- capheight = otfdata.metadata.ascent / units * size
- end
- end
- fontdata.parameters[8] = capheight
-% \end{macrocode}
-%
-% Then we populate \texttt{MathConstants} table, which is required for
+% Then we populate |MathConstants| table, which is required for
% OpenType math.
%
% \begin{macrocode}
+ local otfdata = fontdata.shared.otfdata
if otfdata.metadata.math then
local mc = { }
for k,v in next, otfdata.metadata.math do
@@ -643,33 +613,14 @@ local function def_font(...)
-- keep percent values as is
mc[k] = v
else
- mc[k] = v / units * size
+ mc[k] = v / fontdata.units * fontdata.size
end
end
-- for \overwithdelims
- mc.FractionDelimiterSize = 1.01 * size
- mc.FractionDelimiterDisplayStyleSize = 2.39 * size
+ mc.FractionDelimiterSize = 1.01 * fontdata.size
+ mc.FractionDelimiterDisplayStyleSize = 2.39 * fontdata.size
fontdata.MathConstants = mc
-% \end{macrocode}
-%
-% \luatex does not provide interface to accessing
-% \texttt{(Script)ScriptPercentScaleDown} math constants, so we emulate
-% \xetex behaviour by setting \cs{fontdimen10} and \cs{fontdimen11}.
-%
-% XXX: move to \texttt{unicode-math}.
-%
-% \begin{macrocode}
- if mc["ScriptPercentScaleDown"] then
- fontdata.parameters[10] = mc.ScriptPercentScaleDown
- else -- resort to plain TeX default
- fontdata.parameters[10] = 70
- end
- if mc["ScriptScriptPercentScaleDown"] then
- fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown
- else -- resort to plain TeX default
- fontdata.parameters[11] = 50
- end
end
% \end{macrocode}
%
@@ -710,19 +661,45 @@ end
% Finally we register the callbacks
%
% \begin{macrocode}
-luatexbase.add_to_callback('pre_linebreak_filter',
+luatexbase.add_to_callback("pre_linebreak_filter",
nodes.simple_font_handler,
- 'luaotfload.pre_linebreak_filter')
-luatexbase.add_to_callback('hpack_filter',
+ "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',
+ "luaotfload.hpack_filter")
+luatexbase.reset_callback("define_font")
+luatexbase.add_to_callback("define_font",
def_font,
- 'luaotfload.define_font', 1)
-luatexbase.add_to_callback('find_vf_file',
+ "luaotfload.define_font", 1)
+luatexbase.add_to_callback("find_vf_file",
fonts.vf.find,
- 'luaotfload.find_vf_file')
+ "luaotfload.find_vf_file")
+% \end{macrocode}
+% XXX: see https://github.com/wspr/unicode-math/issues/185
+%
+% \luatex does not provide interface to accessing
+% |(Script)ScriptPercentScaleDown| math constants, so we
+% emulate \xetex behaviour by setting |\fontdimen10| and
+% |\fontdimen11|.
+%
+% \begin{macrocode}
+local function set_sscale_diments(fontdata)
+ local mc = fontdata.MathConstants
+ if mc then
+ if mc["ScriptPercentScaleDown"] then
+ fontdata.parameters[10] = mc.ScriptPercentScaleDown
+ else -- resort to plain TeX default
+ fontdata.parameters[10] = 70
+ end
+ if mc["ScriptScriptPercentScaleDown"] then
+ fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown
+ else -- resort to plain TeX default
+ fontdata.parameters[11] = 50
+ end
+ end
+end
+
+luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_diments, "unicodemath.set_sscale_diments")
% \end{macrocode}
%
% \iffalse
@@ -747,7 +724,7 @@ luatexbase.add_to_callback('find_vf_file',
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2011/02/16 v1.24 OpenType layout system]
+ [2011/04/21 v1.25 OpenType layout system]
\RequirePackage{luatexbase}
\fi
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
index 58b55e235b1..b70e6628665 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
@@ -17,12 +17,12 @@
-- and the derived files
-- luaotfload.sty, luaotfload.lua
--
-module('luaotfload', package.seeall)
+module("luaotfload", package.seeall)
luaotfload.module = {
name = "luaotfload",
- version = 1.24,
- date = "2011/02/16",
+ version = 1.25,
+ date = "2011/04/21",
description = "OpenType layout system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
@@ -30,77 +30,63 @@ luaotfload.module = {
}
local error, warning, info, log = luatexbase.provides_module(luaotfload.module)
-kpse.init_prog('', 600, '/')
+kpse.init_prog("", 600, "/")
local luatex_version = 60
if tex.luatexversion < luatex_version then
- warning('LuaTeX v%.2f is old, v%.2f is recommended.',
+ warning("LuaTeX v%.2f is old, v%.2f is recommended.",
tex.luatexversion/100,
luatex_version /100)
end
function luaotfload.loadmodule(name)
- local tofind = 'otfl-'..name
+ local tofind = "otfl-"..name
local found = kpse.find_file(tofind,"tex")
if found then
- log('loading file %s.', found)
+ log("loading file %s.", found)
dofile(found)
else
- error('file %s not found.', tofind)
+ error("file %s not found.", tofind)
end
end
-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
+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
tex.attribute[0] = 0
-luaotfload.loadmodule('font-ini.lua')
-luaotfload.loadmodule('node-dum.lua')
-luaotfload.loadmodule('node-inj.lua')
+luaotfload.loadmodule("font-ini.lua")
+luaotfload.loadmodule("node-dum.lua")
+luaotfload.loadmodule("node-inj.lua")
function attributes.private(name)
- local attr = 'otfl@' .. name
+ local attr = "otfl@" .. name
local number = luatexbase.attributes[attr]
if not number then
number = luatexbase.new_attribute(attr)
end
return number
end
-luaotfload.loadmodule('font-tfm.lua')
-luaotfload.loadmodule('font-cid.lua')
-luaotfload.loadmodule('font-ott.lua')
-luaotfload.loadmodule('font-map.lua')
-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')
-luaotfload.loadmodule('font-def.lua')
-luaotfload.loadmodule('font-xtx.lua')
-luaotfload.loadmodule('font-dum.lua')
+luaotfload.loadmodule("font-tfm.lua")
+luaotfload.loadmodule("font-cid.lua")
+luaotfload.loadmodule("font-ott.lua")
+luaotfload.loadmodule("font-map.lua")
+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")
+luaotfload.loadmodule("font-def.lua")
+luaotfload.loadmodule("font-xtx.lua")
+luaotfload.loadmodule("font-dum.lua")
if fonts and fonts.tfm and fonts.tfm.readers then
fonts.tfm.readers.ofm = fonts.tfm.readers.tfm
end
-luaotfload.loadmodule('font-nms.lua')
-luaotfload.loadmodule('font-clr.lua')
+luaotfload.loadmodule("font-nms.lua")
+luaotfload.loadmodule("font-clr.lua")
luatexbase.create_callback("luaotfload.patch_font", "simple", function() end)
local function def_font(...)
local fontdata = fonts.define.read(...)
if type(fontdata) == "table" and fontdata.shared then
- local capheight
- local units = fontdata.units
- local size = fontdata.size
- local otfdata = fontdata.shared.otfdata
-
- if otfdata.pfminfo.os2_capheight > 0 then
- capheight = otfdata.pfminfo.os2_capheight / units * size
- else
- if fontdata.characters[string.byte("X")] then
- capheight = fontdata.characters[string.byte("X")].height
- else
- capheight = otfdata.metadata.ascent / units * size
- end
- end
- fontdata.parameters[8] = capheight
+ local otfdata = fontdata.shared.otfdata
if otfdata.metadata.math then
local mc = { }
for k,v in next, otfdata.metadata.math do
@@ -108,24 +94,14 @@ local function def_font(...)
-- keep percent values as is
mc[k] = v
else
- mc[k] = v / units * size
+ mc[k] = v / fontdata.units * fontdata.size
end
end
-- for \overwithdelims
- mc.FractionDelimiterSize = 1.01 * size
- mc.FractionDelimiterDisplayStyleSize = 2.39 * size
+ mc.FractionDelimiterSize = 1.01 * fontdata.size
+ mc.FractionDelimiterDisplayStyleSize = 2.39 * fontdata.size
fontdata.MathConstants = mc
- if mc["ScriptPercentScaleDown"] then
- fontdata.parameters[10] = mc.ScriptPercentScaleDown
- else -- resort to plain TeX default
- fontdata.parameters[10] = 70
- end
- if mc["ScriptScriptPercentScaleDown"] then
- fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown
- else -- resort to plain TeX default
- fontdata.parameters[11] = 50
- end
end
luatexbase.call_callback("luaotfload.patch_font", fontdata)
end
@@ -143,18 +119,35 @@ local gsubs = {
for _,v in next, gsubs do
register_base_sub(v)
end
-luatexbase.add_to_callback('pre_linebreak_filter',
+luatexbase.add_to_callback("pre_linebreak_filter",
nodes.simple_font_handler,
- 'luaotfload.pre_linebreak_filter')
-luatexbase.add_to_callback('hpack_filter',
+ "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',
+ "luaotfload.hpack_filter")
+luatexbase.reset_callback("define_font")
+luatexbase.add_to_callback("define_font",
def_font,
- 'luaotfload.define_font', 1)
-luatexbase.add_to_callback('find_vf_file',
+ "luaotfload.define_font", 1)
+luatexbase.add_to_callback("find_vf_file",
fonts.vf.find,
- 'luaotfload.find_vf_file')
+ "luaotfload.find_vf_file")
+local function set_sscale_diments(fontdata)
+ local mc = fontdata.MathConstants
+ if mc then
+ if mc["ScriptPercentScaleDown"] then
+ fontdata.parameters[10] = mc.ScriptPercentScaleDown
+ else -- resort to plain TeX default
+ fontdata.parameters[10] = 70
+ end
+ if mc["ScriptScriptPercentScaleDown"] then
+ fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown
+ else -- resort to plain TeX default
+ fontdata.parameters[11] = 50
+ end
+ end
+end
+
+luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_diments, "unicodemath.set_sscale_diments")
--
-- End of File `luaotfload.lua'.
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
index 19df049dfc2..ffe95c84011 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
@@ -26,7 +26,7 @@
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2011/02/16 v1.24 OpenType layout system]
+ [2011/04/21 v1.25 OpenType layout system]
\RequirePackage{luatexbase}
\fi
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua
index d32f22f07b3..2ad6898d19d 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-nms.lua
@@ -74,10 +74,11 @@ local function load_names()
return data
end
-local synonyms = {
+local synonyms = {
regular = { "normal", "roman", "plain", "book", "medium" },
- italic = { "regularitalic", "normalitalic", "oblique", "slant" },
- bolditalic = { "boldoblique", "boldslat" },
+ bold = { "boldregular", "demi" },
+ italic = { "regularitalic", "normalitalic", "oblique", "slanted" },
+ bolditalic = { "boldoblique", "boldslanted", "demiitalic", "demioblique", "demislanted" },
}
local loaded = false
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otf.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otf.lua
index d1ad3d006cc..fe9cd51d4c0 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otf.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otf.lua
@@ -225,7 +225,9 @@ function otf.load(filename,format,sub,featurefile)
local attr = lfs.attributes(filename)
local size, time = attr.size or 0, attr.modification or 0
if featurefile then
- name = name .. "@" .. file.removesuffix(file.basename(featurefile))
+ local fattr = lfs.attributes(featurefile)
+ local fsize, ftime = fattr and fattr.size or 0, fattr and fattr.modification or 0
+ name = name .. "@" .. file.removesuffix(file.basename(featurefile)) .. ftime .. fsize
end
if sub == "" then sub = false end
local hash = name
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua
index 96076977d0b..2f6627ff798 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-luat-dum.lua
@@ -56,7 +56,7 @@ local remapper = {
otf = "opentype fonts",
ttf = "truetype fonts",
ttc = "truetype fonts",
- dfont = "truetype dictionary",
+ dfont = "truetype fonts",
cid = "cid maps",
fea = "font feature files",
}