summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-05 22:12:02 +0000
committerKarl Berry <karl@freefriends.org>2016-05-05 22:12:02 +0000
commit3155ad2afcd7018662195b194e415a9e14e62d2a (patch)
tree4b8af85c3d71a3e46971af79ef211f84d86e62c7 /Master/texmf-dist
parentbeca1fbcde73fa759a0e6567a580d8035c224eb3 (diff)
luaotfload (5may16)
git-svn-id: svn://tug.org/texlive/trunk@40902 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luaotfload/NEWS1
-rw-r--r--Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdfbin43592 -> 43592 bytes
-rw-r--r--Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdfbin44311 -> 44311 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/luaotfload/luaotfload-tool.lua95
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/luaotfload-main.tex13
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/luaotfload.conf.rst19
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-2016-05-04.lua (renamed from Master/texmf-dist/tex/luatex/luaotfload/fontloader-2016-04-27.lua)136
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-afm.lua16
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otj.lua8
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otl.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-ots.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-file.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua30
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua26
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua58
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua38
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua46
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua23
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua51
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua38
21 files changed, 390 insertions, 218 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/NEWS b/Master/texmf-dist/doc/luatex/luaotfload/NEWS
index 13c288e0992..f558e3b54f3 100644
--- a/Master/texmf-dist/doc/luatex/luaotfload/NEWS
+++ b/Master/texmf-dist/doc/luatex/luaotfload/NEWS
@@ -8,6 +8,7 @@ Change History
* Adapt packaging to changed upstream file layout.
* Remove support for builtin Fontforge libraries (this includes the PFA,
PFB, DFONT, and feature file readers).
+ * Allow configuration of anonymous lookups.
2015/12/09, luaotfload v2.6
* Add ``sign`` target to makefile for automated package signing.
diff --git a/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf b/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf
index 49dfd2cd3a1..92480b64844 100644
--- a/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf b/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf
index 75d3f034a64..1ca4315da02 100644
--- a/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf
+++ b/Master/texmf-dist/doc/man/man5/luaotfload.conf.man5.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua
index 4b4dc50ecda..35dc9b3d143 100755
--- a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua
+++ b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua
@@ -7,10 +7,11 @@
-- LICENSE: GPL v2.0
-----------------------------------------------------------------------
-luaotfload = luaotfload or { }
-local version = "2.7"
-luaotfload.version = version
-luaotfload.self = "luaotfload-tool"
+luaotfload = luaotfload or { }
+local version = "2.7"
+luaotfload.version = version
+luaotfload.min_luatex_version = { 0, 95, 0 } --- i. e. 0.95.0
+luaotfload.self = "luaotfload-tool"
--[[doc--
@@ -33,16 +34,6 @@ see the luaotfload documentation for more info. Report bugs to
kpse.set_program_name "luatex"
---[[doc--
-
- We test for Lua 5.1 by means of capability detection to see if
- we’re running an outdated Luatex. If so, we bail.
-
- \url{http://lua-users.org/wiki/LuaVersionCompatibility}
-
---doc]]--
-
-
local iowrite = io.write
local kpsefind_file = kpse.find_file
local mathfloor = math.floor
@@ -59,19 +50,32 @@ local texiowrite = texio.write
local tonumber = tonumber
local type = type
-local runtime
-if _G.getfenv ~= nil then -- 5.1 or LJ
- if _G.jit ~= nil then
- runtime = { "jit", jit.version }
- else
- runtime = { "stock", _VERSION }
- print "FATAL ERROR"
- print "Luaotfload requires a Luatex version >=0.76."
- print "Please update your TeX distribution!"
- os.exit (-1)
- end
-else -- 5.2
- runtime = { "stock", _VERSION }
+do
+ local runtime = _G.jit and { "jit" , jit.version }
+ or { "stock", _VERSION }
+ local stats = status and status.list ()
+ local minimum = luaotfload.min_luatex_version
+ local actual = { 0, 0, 0 }
+ if stats then
+ local major = stats.luatex_version / 100
+ local minor = stats.luatex_version % 100
+ local revision = stats.luatex_revision --[[ : string ]]
+ local revno = tonumber (revision)
+ actual = { major, minor, revno or 0 }
+ end
+
+ if actual [1] < minimum [1] or actual [2] < minimum [2]
+ or actual [3] < minimum [3]
+ then
+ texio.write_nl ("term and log",
+ string.format ("\tFATAL ERROR\n\z
+ \tLuaotfload requires a Luatex version >= %d.%d.%d.\n\z
+ \tPlease update your TeX distribution!\n\n",
+ (unpack or table.unpack) (minimum)))
+ error "version check failed"
+ end
+ luaotfload.runtime = runtime
+ luaotfload.luatex_version = actual
end
local C, Ct, P, S = lpeg.C, lpeg.Ct, lpeg.P, lpeg.S
@@ -336,15 +340,21 @@ local version_msg = function ( )
local out = function (...) texiowrite_nl (stringformat (...)) end
local uname = os.uname ()
local meta = fonts.names.getmetadata ()
- local info = status.list ()
+
+ local runtime = luaotfload.runtime
+ local actual = luaotfload.luatex_version
+ local status = config.luaotfload.status
+ local notes = status and status.notes or { }
+
out (about, luaotfload.self)
out ("%s version: %q", luaotfload.self, version)
- out ("Revision: %q", config.luaotfload.status.notes.revision)
+ if notes.description then
+ out ("Luaotfload: %q", notes.description)
+ end
+ out ("Revision: %q", notes.revision)
out ("Lua interpreter: %s; version %q", runtime[1], runtime[2])
--[[out ("Luatex SVN revision: %d", info.luatex_svn)]] --> SVN r5624
- out ("Luatex version: %.2f.%d",
- info.luatex_version / 100,
- info.luatex_revision)
+ out ("Luatex version: %d.%d", actual [1], actual [2])
out ("Platform: type=%s name=%s", os.type, os.name)
local uname_vars = tablesortedkeys (uname)
@@ -356,7 +366,7 @@ local version_msg = function ( )
out("No database metadata available.")
else
out ("Index: version=%q created=%q modified=%q",
- config.luaotfload.status.notes.revision,
+ meta.version or "too old",
meta.created or "ages ago",
meta.modified or "ages ago")
end
@@ -1160,16 +1170,21 @@ actions.query = function (job)
tmpspec.size = 655360 --- assume 10pt
end
- local foundname, subfont, success
+ local foundname, subfont, success, needle
- if tmpspec.lookup == "name"
- or tmpspec.lookup == "anon" --- not *exactly* as resolvers.anon
- then
- foundname, _, success = fonts.names.lookup_font_name (tmpspec)
- if foundname then
- foundname, _, success = fonts.names.lookup_font_file (foundname)
+ if tmpspec.lookup == "name" then
+ if fonts.definers.resolvers.name (tmpspec) then
+ needle = tmpspec.resolved
+ end
+ elseif tmpspec.lookup == "anon" then
+ if fonts.definers.resolvers.anon (tmpspec) then
+ needle = tmpspec.resolved or tmpspec.name
end
elseif tmpspec.lookup == "file" then
+ needle = tmpspec.name
+ end
+
+ if needle then
foundname, _, success = fonts.names.lookup_font_file (tmpspec.name)
end
diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload-main.tex b/Master/texmf-dist/source/luatex/luaotfload/luaotfload-main.tex
index 90738dea3f5..05c36700764 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/luaotfload-main.tex
+++ b/Master/texmf-dist/source/luatex/luaotfload/luaotfload-main.tex
@@ -32,7 +32,7 @@
\beginfrontmatter
\setdocumenttitle {The \identifier{luaotfload} package}
- \setdocumentdate {2016/04/21 v2.7}
+ \setdocumentdate {2016/04/28 v2.7}
\setdocumentauthor {Elie Roux · Khaled Hosny · Philipp Gesang\\
Home: \hyperlink {https://github.com/lualatex/luaotfload}\\
Support: \email {lualatex-dev@tug.org}}
@@ -363,9 +363,14 @@ However, they have a broader spectrum of possible interpretations:
before anything else, \identifier{luaotfload} attempts to load a
traditional \TEX Font Metric (\abbrev{tfm} or \abbrev{ofm}).
%
-If this fails, it performs a \inlinecode {name:} lookup, which itself will
-fall back to a \inlinecode {file:} lookup if no database entry matches
-\meta{font name}.
+If this fails, it performs a \inlinecode {path:} lookup, which itself will
+fall back to a \inlinecode {file:} lookup.
+%
+Lastly, if none of the above succeeded, attempt to resolve the request as a
+\inlinecode {name:} lookup by searching the font index for \meta{font name}.
+%
+The behavior of this “anonymous” lookup is configurable, see the configuation
+manpage for details.
Furthermore, \identifier{luaotfload} supports the slashed (shorthand)
font style notation from \XETEX.
diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.conf.rst b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.conf.rst
index e7cbccba4a6..7b7f3420674 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.conf.rst
+++ b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.conf.rst
@@ -6,7 +6,7 @@
Luaotfload configuration file
-----------------------------------------------------------------------
-:Date: 2016-04-21
+:Date: 2016-04-28
:Copyright: GPL v2.0
:Version: 2.7
:Manual section: 5
@@ -271,6 +271,8 @@ Section ``run``
+------------------+--------+------------------------------+
| variable | type | default |
+------------------+--------+------------------------------+
+| anon-sequence | s | ``"tex,path,name"`` |
++------------------+--------+------------------------------+
| color-callback | s | ``"post_linebreak_filter"`` |
+------------------+--------+------------------------------+
| definer | s | ``"patch"`` |
@@ -282,6 +284,21 @@ Section ``run``
| fontloader | s | ``"default"`` |
+------------------+--------+------------------------------+
+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 ``[/path/to/font/foo.ttf]`` syntax) or a file name
+(``file:foo.ttf``). Finally, the request is interpreted as a font name
+and retrieved from the index (``name:Foo Regular``). This behavior can
+be configured by specifying a list as the value to ``anon-sequence``.
+Available items are ``tex``, ``path``, ``name`` -- representing the
+lookups described above, respectively --, and ``file`` for searching a
+filename but not an absolute path. Also, ``my`` lookups are valid
+values but they should only be used from within TeX documents, because
+there is no means of customizing a ``my`` lookups on the command line.
+
The ``color-callback`` option determines the stage at which fonts that
defined with a ``color=xxyyzz`` feature will be colorized. By default
this happens in a ``post_linebreak_filter`` but alternatively the
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2016-04-27.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2016-05-04.lua
index 09d12116b01..3cc83add22b 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2016-04-27.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-2016-05-04.lua
@@ -1,6 +1,6 @@
--[[info-----------------------------------------------------------------------
Luaotfload fontloader package
- build 2016-04-27 23:00:31 by phg@phlegethon
+ build 2016-05-04 21:57:53 by phg@phlegethon
-------------------------------------------------------------------------------
© 2016 PRAGMA ADE / ConTeXt Development Team
@@ -50,7 +50,7 @@
--info]]-----------------------------------------------------------------------
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “data-con” 675f5a0af45ffb3e0d2e2ab5d6c2e47b] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “data-con” 675f5a0af45ffb3e0d2e2ab5d6c2e47b] ---
if not modules then modules={} end modules ['data-con']={
version=1.100,
@@ -162,10 +162,10 @@ function containers.cleanname(name)
return (gsub(lower(name),"[^%w\128-\255]+","-"))
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “data-con”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “data-con”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “basics-nod” ecd4eb8a91ac539824a9a72c5b97ded4] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “basics-nod” ecd4eb8a91ac539824a9a72c5b97ded4] ---
if not modules then modules={} end modules ['luatex-fonts-nod']={
version=1.001,
@@ -415,10 +415,10 @@ end
nodes.setprop=nodes.setproperty
nodes.getprop=nodes.getproperty
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “basics-nod”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “basics-nod”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ini” 179f0a75cda26696c1b1cd6d7fe0d8ae] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ini” 179f0a75cda26696c1b1cd6d7fe0d8ae] ---
if not modules then modules={} end modules ['font-ini']={
version=1.001,
@@ -442,10 +442,10 @@ fonts.definers={ methods={} }
fonts.loggers={ register=function() end }
fontloader.totable=fontloader.to_table
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ini”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ini”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-con” 7f28698f84d848b60d2ce8d38315d4af] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-con” 7f28698f84d848b60d2ce8d38315d4af] ---
if not modules then modules={} end modules ['font-con']={
version=1.001,
@@ -1601,10 +1601,10 @@ function constructors.addcoreunicodes(unicodes)
return unicodes
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-con”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-con”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “fonts-enc” b224fe179312d924ffaf8334cf5ef15b] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “fonts-enc” b224fe179312d924ffaf8334cf5ef15b] ---
if not modules then modules={} end modules ['luatex-font-enc']={
version=1.001,
@@ -1632,10 +1632,10 @@ setmetatable(fonts.encodings.agl,{ __index=function(t,k)
end
end })
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “fonts-enc”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “fonts-enc”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-cid” 52421d1fdaa07ec4b1d936c6ff5079be] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-cid” 52421d1fdaa07ec4b1d936c6ff5079be] ---
if not modules then modules={} end modules ['font-cid']={
version=1.001,
@@ -1786,10 +1786,10 @@ function cid.getmap(specification)
return found
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-cid”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-cid”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-map” a637f0737dc9bbacd787e1d1f0757892] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-map” a637f0737dc9bbacd787e1d1f0757892] ---
if not modules then modules={} end modules ['font-map']={
version=1.001,
@@ -2131,10 +2131,10 @@ function mappings.addtounicode(data,filename,checklookups)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-map”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-map”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “fonts-syn” 6753dfb9a28aad35266284bb00072dca] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “fonts-syn” 6753dfb9a28aad35266284bb00072dca] ---
if not modules then modules={} end modules ['luatex-fonts-syn']={
version=1.001,
@@ -2209,10 +2209,10 @@ function fonts.names.ignoredfile(filename)
return false
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “fonts-syn”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “fonts-syn”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-tfm” 55448a6f5880ced92a2f79b4debc1746] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-tfm” 55448a6f5880ced92a2f79b4debc1746] ---
if not modules then modules={} end modules ['font-tfm']={
version=1.001,
@@ -2369,10 +2369,10 @@ function readers.tfm(specification)
end
readers.ofm=readers.tfm
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-tfm”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-tfm”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-afm” 6b7aecde4ba0233606b09e45f49bae1f] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-afm” 5ef09530f6523caf718d9f949f5e0b17] ---
if not modules then modules={} end modules ['font-afm']={
version=1.001,
@@ -2515,11 +2515,12 @@ end
local get_indexes
do
local fontloader=fontloader
+ local get_indexes_old=false
if fontloader then
local font_to_table=fontloader.to_table
local open_font=fontloader.open
local close_font=fontloader.close
- local function get_indexes_old(data,pfbname)
+ get_indexes_old=function(data,pfbname)
local pfbblob=open_font(pfbname)
if pfbblob then
local characters=data.characters
@@ -2636,7 +2637,7 @@ do
end
end
end
- if fontloader then
+ if get_indexes_old then
afm.use_new_indexer=true
get_indexes_new=get_indexes
get_indexes=function(data,pfbname)
@@ -2816,7 +2817,13 @@ unify=function(data,filename)
resources.marks={}
resources.private=private
end
+local everywhere={ ["*"]={ ["*"]=true } }
+local noflags={ false,false,false,false }
+afm.experimental_normalize=false
normalize=function(data)
+ if type(afm.experimental_normalize)=="function" then
+ afm.experimental_normalize(data)
+ end
end
fixnames=function(data)
for k,v in next,data.descriptions do
@@ -3325,10 +3332,10 @@ function readers.pfb(specification,method)
return readers.afm(specification,method)
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-afm”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-afm”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-afk” b36a76ceb835f41f8c05b471000ddc14] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-afk” b36a76ceb835f41f8c05b471000ddc14] ---
if not modules then modules={} end modules ['font-afk']={
version=1.001,
@@ -3495,10 +3502,10 @@ fonts.handlers.afm.helpdata={
}
}
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-afk”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-afk”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-oti” b6d493035cec2d748f2f9ec510c860ef] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-oti” b6d493035cec2d748f2f9ec510c860ef] ---
if not modules then modules={} end modules ['font-oti']={
version=1.001,
@@ -3637,10 +3644,10 @@ function otffeatures.checkeddefaultlanguage(featuretype,autolanguage,languages)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-oti”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-oti”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-otr” 84b2e945c057993df5016d3833e5c674] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-otr” 84b2e945c057993df5016d3833e5c674] ---
if not modules then modules={} end modules ['font-otr']={
version=1.001,
@@ -5311,10 +5318,10 @@ if fonts.hashes then
end)
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-otr”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-otr”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-cff” 84590de32a9d3bcd1e3fee0bb667e9c2] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-cff” 84590de32a9d3bcd1e3fee0bb667e9c2] ---
if not modules then modules={} end modules ['font-cff']={
version=1.001,
@@ -6683,10 +6690,10 @@ function readers.cff(f,fontdata,specification)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-cff”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-cff”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ttf” e0893de6d0f3f421ee4386fa90429db8] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ttf” e0893de6d0f3f421ee4386fa90429db8] ---
if not modules then modules={} end modules ['font-ttf']={
version=1.001,
@@ -7098,10 +7105,10 @@ function readers.glyf(f,fontdata,specification)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ttf”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ttf”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-dsp” 05d720a52d25a9d4271e3e1372637a42] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-dsp” d6c47b8f920d994067bcdd1653d7958f] ---
if not modules then modules={} end modules ['font-dsp']={
version=1.001,
@@ -8085,8 +8092,8 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
end
for i=1,nofbaserecords do
local components=baserecords[i]
- local b=basecoverage[i]
if components then
+ local b=basecoverage[i]
for c=1,#components do
local classes=components[c]
if classes then
@@ -8101,7 +8108,6 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
end
end
end
- components[i]=classes
end
end
end
@@ -9038,10 +9044,10 @@ function readers.math(f,fontdata,specification)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-dsp”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-dsp”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-oup” d716035aa38987a788c1965016f913eb] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-oup” d716035aa38987a788c1965016f913eb] ---
if not modules then modules={} end modules ['font-oup']={
version=1.001,
@@ -11016,10 +11022,10 @@ function readers.expand(data)
expandlookups(sublookups)
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-oup”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-oup”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-otl” 4ec5c0c37622edc49cd7c0fa33fb4e4c] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-otl” ba04f48a4a5d5c1e86318a169f8c1853] ---
if not modules then modules={} end modules ['font-otl']={
version=1.001,
@@ -11048,7 +11054,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_de
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.018
+otf.version=3.019
otf.cache=containers.define("fonts","otl",otf.version,true)
local otfreaders=otf.readers
local hashes=fonts.hashes
@@ -11688,10 +11694,10 @@ otf.coverup={
end
}
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-otl”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-otl”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-oto” acff5cbf6b4a1831bb0f567e6b012949] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-oto” acff5cbf6b4a1831bb0f567e6b012949] ---
if not modules then modules={} end modules ['font-oto']={
version=1.001,
@@ -12063,10 +12069,10 @@ registerotffeature {
}
}
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-oto”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-oto”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-otj” d5cf0497a3bdc08b7911502e5fb91003] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-otj” 79bea0740b5102bedc7776255dbe6724] ---
if not modules then modules={} end modules ['font-otj']={
version=1.001,
@@ -13068,9 +13074,11 @@ local function inject_everything(head,where)
end
else
local i=p.emptyinjections
- local leftkern=i.leftkern
- if leftkern and leftkern~=0 then
- setfield(prev,"replace",newkern(leftkern))
+ if i then
+ local leftkern=i.leftkern
+ if leftkern and leftkern~=0 then
+ setfield(prev,"replace",newkern(leftkern))
+ end
end
end
if done then
@@ -13362,10 +13370,10 @@ function injections.handler(head,where)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-otj”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-otj”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ota” 613dee572209df8e25b7a9aa5a7173e9] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ota” 613dee572209df8e25b7a9aa5a7173e9] ---
if not modules then modules={} end modules ['font-ota']={
version=1.001,
@@ -13739,10 +13747,10 @@ directives.register("otf.analyze.useunicodemarks",function(v)
analyzers.useunicodemarks=v
end)
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ota”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ota”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ots” 2dac3c521e78085eacce2a9697f43919] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ots” e89cde7b48a90e52fd8d612409c614c8] ---
if not modules then modules={} end modules ['font-ots']={
version=1.001,
@@ -16442,7 +16450,7 @@ local function txtdirstate(start,stack,top,rlparmode)
new=rlparmode
end
if trace_directions then
- report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),topstack)
+ report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),top)
end
return getnext(start),top,new
end
@@ -16811,10 +16819,10 @@ registerotffeature {
},
}
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-ots”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-ots”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-osd” 67fc27b4ec499b31941f5a941e55c998] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-osd” 67fc27b4ec499b31941f5a941e55c998] ---
if not modules then modules={} end modules ['font-osd']={
version=1.001,
@@ -18783,10 +18791,10 @@ end
methods.mlym=methods.deva
methods.mlm2=methods.dev2
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-osd”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-osd”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-lua” 1fbfdf7b689b2bdfd0e3bb9bf74ce136] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-lua” 1fbfdf7b689b2bdfd0e3bb9bf74ce136] ---
if not modules then modules={} end modules ['font-lua']={
version=1.001,
@@ -18826,10 +18834,10 @@ function readers.lua(specification)
return check_lua(specification,fullname)
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-lua”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-lua”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-def” 3c71c27300a8cb5c29f5d278d2049fb6] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-def” 3c71c27300a8cb5c29f5d278d2049fb6] ---
if not modules then modules={} end modules ['font-def']={
version=1.001,
@@ -19160,10 +19168,10 @@ function font.getfont(id)
end
callbacks.register('define_font',definers.read,"definition of fonts (tfmdata preparation)")
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-def”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-def”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “fonts-ext” 0eee87fb26b7d135da88ac0a43a8037a] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “fonts-ext” 0eee87fb26b7d135da88ac0a43a8037a] ---
if not modules then modules={} end modules ['luatex-fonts-ext']={
version=1.001,
@@ -19380,10 +19388,10 @@ otffeatures.register {
}
}
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “fonts-ext”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “fonts-ext”] ---
-do --- [luaotfload, fontloader-2016-04-27.lua scope for “font-gbn” 1d9dd4d7f55c8431d5fceeeb4e729027] ---
+do --- [luaotfload, fontloader-2016-05-04.lua scope for “font-gbn” 1d9dd4d7f55c8431d5fceeeb4e729027] ---
if not modules then modules={} end modules ['font-gbn']={
version=1.001,
@@ -19617,7 +19625,7 @@ function nodes.simple_font_handler(head)
end
end
-end --- [luaotfload, fontloader-2016-04-27.lua scope for “font-gbn”] ---
+end --- [luaotfload, fontloader-2016-05-04.lua scope for “font-gbn”] ---
--- vim:ft=lua:sw=2:ts=8:et:tw=79
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-afm.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-afm.lua
index 99b85774781..0d6b7cb9918 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-afm.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-afm.lua
@@ -228,7 +228,8 @@ do
-- old font loader
- local fontloader = fontloader
+ local fontloader = fontloader
+ local get_indexes_old = false
if fontloader then
@@ -236,7 +237,7 @@ do
local open_font = fontloader.open
local close_font = fontloader.close
- local function get_indexes_old(data,pfbname)
+ get_indexes_old = function(data,pfbname)
local pfbblob = open_font(pfbname)
if pfbblob then
local characters = data.characters
@@ -394,7 +395,7 @@ do
end
end
- if fontloader then
+ if get_indexes_old then
afm.use_new_indexer = true
get_indexes_new = get_indexes
@@ -598,7 +599,15 @@ unify = function(data, filename)
resources.private = private
end
+local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
+local noflags = { false, false, false, false }
+
+afm.experimental_normalize = false
+
normalize = function(data)
+ if type(afm.experimental_normalize) == "function" then
+ afm.experimental_normalize(data)
+ end
end
fixnames = function(data)
@@ -616,7 +625,6 @@ fixnames = function(data)
end
end
-
--[[ldx--
<p>These helpers extend the basic table with extra ligatures, texligatures
and extra kerns. This saves quite some lookups later.</p>
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua
index 85a80bdf82c..330a9400c32 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-dsp.lua
@@ -1144,8 +1144,8 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
end
for i=1,nofbaserecords do
local components = baserecords[i]
- local b = basecoverage[i]
if components then
+ local b = basecoverage[i]
for c=1,#components do
local classes = components[c]
if classes then
@@ -1160,7 +1160,7 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
end
end
end
- components[i] = classes
+-- components[i] = classes
end
end
end
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otj.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otj.lua
index ebda723d54d..6ff80d88df8 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otj.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otj.lua
@@ -1202,9 +1202,11 @@ local function inject_everything(head,where)
else
-- local i = rawget(p,"emptyinjections")
local i = p.emptyinjections
- local leftkern = i.leftkern
- if leftkern and leftkern ~= 0 then
- setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern
+ if i then
+ local leftkern = i.leftkern
+ if leftkern and leftkern ~= 0 then
+ setfield(prev,"replace",newkern(leftkern)) -- maybe also leftkern
+ end
end
end
if done then
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otl.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otl.lua
index bcea2752015..f7b6eb5ae5f 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otl.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-otl.lua
@@ -53,7 +53,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.018 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.019 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
local otfreaders = otf.readers
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-ots.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-ots.lua
index 90fcde28cce..21225c2274f 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-ots.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-ots.lua
@@ -3347,7 +3347,7 @@ local function txtdirstate(start,stack,top,rlparmode)
new = rlparmode
end
if trace_directions then
- report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),topstack)
+ report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),top)
end
return getnext(start), top, new
end
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-file.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-file.lua
index 7ed6370f260..b6822e95479 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-file.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-file.lua
@@ -436,7 +436,7 @@ local deslasher = lpeg.replacer(S("\\/")^1,"/")
function file.join(one, two, three, ...)
if not two then
- return one == "" and one or lpegmatch(stripper,one)
+ return one == "" and one or lpegmatch(reslasher,one)
end
if one == "" then
return lpegmatch(stripper,three and concat({ two, three, ... },"/") or two)
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua
index 5be64934644..5f35deddf86 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-reference.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 04/27/16 10:18:10
+-- merge date : 05/01/16 09:52:32
do -- begin closure to overcome local limits and interference
@@ -2545,7 +2545,7 @@ local reslasher=lpeg.replacer(S("\\/"),"/")
local deslasher=lpeg.replacer(S("\\/")^1,"/")
function file.join(one,two,three,...)
if not two then
- return one=="" and one or lpegmatch(stripper,one)
+ return one=="" and one or lpegmatch(reslasher,one)
end
if one=="" then
return lpegmatch(stripper,three and concat({ two,three,... },"/") or two)
@@ -7114,11 +7114,12 @@ end
local get_indexes
do
local fontloader=fontloader
+ local get_indexes_old=false
if fontloader then
local font_to_table=fontloader.to_table
local open_font=fontloader.open
local close_font=fontloader.close
- local function get_indexes_old(data,pfbname)
+ get_indexes_old=function(data,pfbname)
local pfbblob=open_font(pfbname)
if pfbblob then
local characters=data.characters
@@ -7235,7 +7236,7 @@ do
end
end
end
- if fontloader then
+ if get_indexes_old then
afm.use_new_indexer=true
get_indexes_new=get_indexes
get_indexes=function(data,pfbname)
@@ -7415,7 +7416,13 @@ unify=function(data,filename)
resources.marks={}
resources.private=private
end
+local everywhere={ ["*"]={ ["*"]=true } }
+local noflags={ false,false,false,false }
+afm.experimental_normalize=false
normalize=function(data)
+ if type(afm.experimental_normalize)=="function" then
+ afm.experimental_normalize(data)
+ end
end
fixnames=function(data)
for k,v in next,data.descriptions do
@@ -12678,8 +12685,8 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
end
for i=1,nofbaserecords do
local components=baserecords[i]
- local b=basecoverage[i]
if components then
+ local b=basecoverage[i]
for c=1,#components do
local classes=components[c]
if classes then
@@ -12694,7 +12701,6 @@ local function handlemark(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
end
end
end
- components[i]=classes
end
end
end
@@ -15639,7 +15645,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_de
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.018
+otf.version=3.019
otf.cache=containers.define("fonts","otl",otf.version,true)
local otfreaders=otf.readers
local hashes=fonts.hashes
@@ -17657,9 +17663,11 @@ local function inject_everything(head,where)
end
else
local i=p.emptyinjections
- local leftkern=i.leftkern
- if leftkern and leftkern~=0 then
- setfield(prev,"replace",newkern(leftkern))
+ if i then
+ local leftkern=i.leftkern
+ if leftkern and leftkern~=0 then
+ setfield(prev,"replace",newkern(leftkern))
+ end
end
end
if done then
@@ -21029,7 +21037,7 @@ local function txtdirstate(start,stack,top,rlparmode)
new=rlparmode
end
if trace_directions then
- report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),topstack)
+ report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),top)
end
return getnext(start),top,new
end
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua
index e544dd70bd1..e482aba353d 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua
@@ -100,17 +100,21 @@ luaotfload_callbacks [#luaotfload_callbacks + 1] = {
"patch_font", set_sscale_dimens, "set_sscale_dimens",
}
+local default_units = 1000
+
--- fontobj -> int
local lookup_units = function (fontdata)
- local metadata = fontdata.shared and fontdata.shared.rawdata.metadata
- if metadata and metadata.units then
- return metadata.units
- elseif fontdata.parameters and fontdata.parameters.units then
- return fontdata.parameters.units
- elseif fontdata.units then --- v1.x
- return fontdata.units
+ local units = fontdata.units
+ if units and units > 0 then return units end
+ local shared = fontdata.shared if not shared then return default_units end
+ local rawdata = shared.rawdata if not rawdata then return default_units end
+ local metadata = rawdata.metadata if not metadata then return default_units end
+ local capheight = metadata.capheight if not capheight then return default_units end
+ local units = metadata.units or fontdata.units
+ if not units or units == 0 then
+ return default_units
end
- return 1000
+ return units
end
--[[doc--
@@ -213,8 +217,9 @@ local query_ascender = function (fontdata)
local metadata = rawdata.metadata if not metadata then return false end
local ascender = parameters.ascender
or metadata.ascender if not ascender then return false end
- local units = metadata.units if units == 0 then return false end
local size = parameters.size if not size then return false end
+ local units = lookup_units (fontdata)
+ if not units or units == 0 then return false end
return ascender * size / units
end
@@ -224,8 +229,9 @@ local query_capheight = function (fontdata)
local rawdata = shared.rawdata if not rawdata then return false end
local metadata = rawdata.metadata if not metadata then return false end
local capheight = metadata.capheight if not capheight then return false end
- local units = metadata.units if units == 0 then return false end
local size = parameters.size if not size then return false end
+ local units = lookup_units (fontdata)
+ if not units or units == 0 then return false end
return capheight * size / units
end
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
index 92de4321551..8cdebe063d8 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-configuration.lua
@@ -92,6 +92,14 @@ local valid_formats = tabletohash {
"otf", "ttc", "ttf", "afm", "pfb"
}
+local default_anon_sequence = {
+ "tex", "path", "name"
+}
+
+local valid_resolvers = tabletohash {
+ "tex", "path", "name", "file", "my"
+}
+
local feature_presets = {
arab = tabletohash {
"ccmp", "locl", "isol", "fina", "fin2",
@@ -198,6 +206,7 @@ local default_config = {
use_fontforge = false,
},
run = {
+ anon_sequence = default_anon_sequence,
resolver = "cached",
definer = "patch",
log_level = 0,
@@ -502,6 +511,45 @@ local option_spec = {
use_fontforge = { in_t = boolean_t, },
},
run = {
+ anon_sequence = {
+ in_t = string_t,
+ out_t = table_t,
+ transform = function (s)
+ if s ~= "default" then
+ local bits = { lpegmatch (commasplitter, s) }
+ if next (bits) then
+ local seq = { }
+ local done = { }
+ for i = 1, #bits do
+ local bit = bits [i]
+ if valid_resolvers [bit] then
+ if not done [bit] then
+ done [bit] = true
+ seq [#seq + 1] = bit
+ else
+ logreport ("both", 0, "conf",
+ "ignoring duplicate resolver %s at position %d \z
+ in lookup sequence",
+ bit, i)
+ end
+ else
+ logreport ("both", 0, "conf",
+ "lookup sequence contains invalid item %s \z
+ at position %d.",
+ bit, i)
+ end
+ end
+ if next (seq) then
+ logreport ("both", 2, "conf",
+ "overriding anon lookup sequence %s.",
+ tableconcat (seq, ","))
+ return seq
+ end
+ end
+ end
+ return default_anon_sequence
+ end
+ },
live = { in_t = boolean_t, }, --- false for the tool, true for TeX run
resolver = {
in_t = string_t,
@@ -639,6 +687,15 @@ local format_keyval = function (var, val)
end
end
+local format_list = function (var, val)
+ local elts = { }
+ for i = 1, #val do elts [i] = val [i] end
+ if next (elts) then
+ return stringformat (indent .. "%s = %s",
+ var, tableconcat (elts, ","))
+ end
+end
+
local format_section = function (title)
return stringformat ("[%s]", dashed (title))
end
@@ -693,6 +750,7 @@ local formatters = {
lookups_file = { false, format_string },
},
run = {
+ anon_sequence = { false, format_list },
color_callback = { false, format_string },
definer = { false, format_string },
fontloader = { false, format_string },
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
index 5e9bf7ba115..5152fabc15c 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
@@ -74,7 +74,7 @@ local defined_combos = 0
local handle_combination = function (combo, spec)
defined_combos = defined_combos + 1
if not combo [1] then
- report ("both", 0, "load",
+ report ("both", 0, "features",
"combo %d: Empty font combination requested.",
defined_combos)
return false
@@ -91,7 +91,7 @@ local handle_combination = function (combo, spec)
tablesort (combo, cmp_by_idx)
--- pass 1: skim combo and resolve fonts
- report ("both", 0, "load", "combo %d: combining %d fonts.",
+ report ("both", 2, "features", "combo %d: combining %d fonts.",
defined_combos, n)
for i = 1, n do
local cur = combo [i]
@@ -101,18 +101,18 @@ local handle_combination = function (combo, spec)
if fnt then
local chars = cur.chars
if chars == true then
- report ("both", 0, "load",
+ report ("both", 2, "features",
" *> %.2d: fallback font %d at rank %d.",
i, id, idx)
else
- report ("both", 0, "load",
+ report ("both", 2, "features",
" *> %.2d: include font %d at rank %d (%d items).",
i, id, idx, (chars and #chars or 0))
end
chain [#chain + 1] = { fnt, chars, idx = idx }
fontids [#fontids + 1] = { id = id }
else
- report ("both", 0, "load",
+ report ("both", 0, "features",
" *> %.2d: font %d at rank %d unknown, skipping.",
n, id, idx)
--- TODO might instead attempt to define the font at this point
@@ -122,14 +122,14 @@ local handle_combination = function (combo, spec)
local nc = #chain
if nc == 0 then
- report ("both", 0, "load",
+ report ("both", 0, "features",
" *> no valid font (of %d) in combination.", n)
return false
end
local basefnt = chain [1] [1]
if nc == 1 then
- report ("both", 0, "load",
+ report ("both", 0, "features",
" *> combination boils down to a single font (%s) \z
of %d initially specified; not pursuing this any \z
further.", basefnt.fullname, n)
@@ -168,27 +168,28 @@ local handle_combination = function (combo, spec)
for j = 1, #def do
local this = def [j]
if type (this) == "number" then
- report ("both", 0, "load",
+ report ("both", 2, "features",
" *> [%d][%d]: import codepoint U+%.4X",
i, j, this)
pickchr (this)
elseif type (this) == "table" then
local lo, hi = unpack (this)
- report ("both", 0, "load",
+ report ("both", 2, "features",
" *> [%d][%d]: import codepoint range U+%.4X--U+%.4X",
i, j, lo, hi)
for uc = lo, hi do pickchr (uc) end
else
- report ("both", 0, "load",
+ report ("both", 0, "features",
" *> item no. %d of combination definition \z
%d not processable.", j, i)
end
end
end
- report ("both", 0, "load",
+ report ("both", 2, "features",
" *> font %d / %d: imported %d glyphs into combo.",
i, nc, cnt)
end
+ spec.lookup = "combo"
spec.file = basefnt.filename
spec.name = stringformat ("luaotfload<%d>", defined_combos)
spec.features = { normal = { spec.specification } }
@@ -1081,7 +1082,7 @@ local apply_default_features = function (speclist)
or (scripts[script] and script)
or "dflt"
if support_incomplete[script] then
- report("log", 0, "load",
+ report("log", 0, "features",
"Support for the requested script: "
.. "%q may be incomplete.", script)
end
@@ -1090,13 +1091,13 @@ local apply_default_features = function (speclist)
end
speclist.script = script
- report("log", 1, "load",
+ report("log", 2, "features",
"Auto-selecting default features for script: %s.",
script)
local requested = default_features.defaults[script]
if not requested then
- report("log", 1, "load",
+ report("log", 2, "features",
"No default features for script %q, falling back to \"dflt\".",
script)
requested = default_features.defaults.dflt
@@ -1157,8 +1158,7 @@ local handle_slashed = function (modifiers)
optsize = tonumber(mod[2])
elseif mod == false then
--- ignore
- report("log", 0,
- "load", "unsupported font option: %s", v)
+ report("log", 0, "features", "unsupported font option: %s", v)
elseif supported[mod] then
style = supported[mod]
elseif not stringis_empty(mod) then
@@ -1189,9 +1189,9 @@ local handle_request = function (specification)
--- in an anonymous lookup;
--- we try to behave as friendly as possible
--- just go with it ...
- report("log", 1, "load", "invalid request %q of type anon",
+ report("log", 1, "features", "invalid request %q of type anon",
specification.specification)
- report("log", 1, "load",
+ report("log", 1, "features",
"use square bracket syntax or consult the documentation.")
--- The result of \fontname must be re-feedable into \font
--- which is expected by the Latex font mechanism. Now this
@@ -1255,7 +1255,7 @@ end
if as_script == true then --- skip the remainder of the file
fonts.names.handle_request = handle_request
- report ("log", 5, "load",
+ report ("log", 5, "features",
"Exiting early from luaotfload-features.lua.")
return
else
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua
index 007fa515b88..78df1d79ba1 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua
@@ -28,9 +28,6 @@ local setfield = nodedirect.setfield
local field_setter = function (name) return function (n, ...) setfield (n, name, ...) end end
local field_getter = function (name) return function (n, ...) getfield (n, name, ...) end end
---- As of December 2014 the faster ``node.direct.*`` interface is
---- preferred.
-
local getfont = nodedirect.getfont
local getid = nodedirect.getid
@@ -277,7 +274,7 @@ local kernfactors = { } --- fontid -> factor
local kerncharacters
kerncharacters = function (head)
- local start, done = head, false
+ local start = head
local lastfont = nil
local keepligature = letterspace.keepligature --- function
local keeptogether = letterspace.keeptogether --- function
@@ -351,8 +348,7 @@ kerncharacters = function (head)
end
start = c
setfield(s, "components", nil)
- free_node(s)
- done = true
+ --free_node(s) --> double free with multipart components
c = getfield (start, "components")
end
end
@@ -378,7 +374,6 @@ kerncharacters = function (head)
local shrunk = (getfield(spec,"shrink") * newwd) / wd
setfield(prev, "spec",
spec_injector(fillup, newwd, stretched, shrunk))
- done = true
end
elseif pid == kern_code then
@@ -400,7 +395,6 @@ kerncharacters = function (head)
local prev_kern = getfield(prev, "kern")
prev_kern = prev_kern + quaddata[lastfont] * krn
setfield (prev, "kern", prev_kern)
- done = true
end
end
@@ -411,16 +405,23 @@ kerncharacters = function (head)
if keeptogether and keeptogether(prev, start) then
-- keep 'm
elseif identifiers[lastfont] then
- local kerns = chardata[lastfont] and chardata[lastfont][prevchar].kerns
- local kern = kerns and kerns[lastchar] or 0
- krn = kern + quaddata[lastfont]*krn -- here
- insert_node_before(head,start,kern_injector(fillup,krn))
- done = true
+ local lastfontchars = chardata[lastfont]
+ if lastfontchars then
+ local prevchardata = lastfontchars[prevchar]
+ if not prevchardata then
+ --- font doesn’t contain the glyph
+ else
+ local kern = 0
+ local kerns = prevchardata.kerns
+ if kerns then kern = kerns[lastchar] or kern end
+ krn = kern + quaddata[lastfont]*krn -- here
+ insert_node_before(head,start,kern_injector(fillup,krn))
+ end
+ end
end
else
krn = quaddata[lastfont]*krn -- here
insert_node_before(head,start,kern_injector(fillup,krn))
- done = true
end
elseif pid == disc_code then
@@ -477,10 +478,19 @@ kerncharacters = function (head)
and getid(prv) == glyph_code
and getfont(prv) == lastfont
then
+ local kern = 0
local prevchar = getchar(prv)
local lastchar = getchar(start)
- local kerns = chardata[lastfont] and chardata[lastfont][prevchar].kerns
- local kern = kerns and kerns[lastchar] or 0
+ local lastfontchars = chardata[lastfont]
+ if lastfontchars then
+ local prevchardata = lastfontchars[prevchar]
+ if not prevchardata then
+ --- font doesn’t contain the glyph
+ else
+ local kerns = prevchardata.kerns
+ if kerns then kern = kerns[lastchar] or kern end
+ end
+ end
krn = kern + quaddata[lastfont]*krn -- here
else
krn = quaddata[lastfont]*krn -- here
@@ -496,7 +506,7 @@ kerncharacters = function (head)
start = getnext(start)
end
end
- return head, done
+ return head
end
---=================================================================---
@@ -548,7 +558,7 @@ local enablefontkerning = function ( )
logreport ("term", 5, "letterspace",
"kerncharacters() invoked with node.direct interface \z
(``%s`` -> ``%s``)", tostring (hd), tostring (direct_hd))
- local direct_hd, _done = kerncharacters (direct_hd)
+ local direct_hd = kerncharacters (direct_hd)
if not direct_hd then --- bad
logreport ("both", 0, "letterspace",
"kerncharacters() failed to return a valid new head")
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua
index 9e8d0881226..25be3db3f00 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua
@@ -13,9 +13,30 @@ local luaotfload = luaotfload
luaotfload.log = luaotfload.log or { }
luaotfload.version = "2.7"
luaotfload.loaders = { }
-luaotfload.min_luatex_version = 95 --- i. e. 0.95
+luaotfload.min_luatex_version = { 0, 95, 0 } --- i. e. 0.95.0
luaotfload.fontloader_package = "reference" --- default: from current Context
+if not tex or not tex.luatexversion then
+ error "this program must be run in TeX mode" --- or call tex.initialize() =)
+else
+ --- version check
+ local major = tex.luatexversion / 100
+ local minor = tex.luatexversion % 100
+ local revision = tex.luatexrevision --[[ : string ]]
+ local revno = tonumber (revision)
+ local minimum = luaotfload.min_luatex_version
+ if major < minimum [1] or minor < minimum [2]
+ or revno and revno < minimum [3]
+ then
+ texio.write_nl ("term and log",
+ string.format ("\tFATAL ERROR\n\z
+ \tLuaotfload requires a Luatex version >= %d.%d.%d.\n\z
+ \tPlease update your TeX distribution!\n\n",
+ (unpack or table.unpack) (minimum)))
+ error "version check failed"
+ end
+end
+
local authors = "\z
Hans Hagen,\z
Khaled Hosny,\z
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua
index ee3b59740b9..a1e702b71b5 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-resolvers.lua
@@ -29,6 +29,7 @@ if not luaotfload then error "this module requires Luaotfload" end
--doc]]--
local next = next
+local tableconcat = table.concat
local kpsefind_file = kpse.find_file
local lfsisfile = lfs.isfile
local stringlower = string.lower
@@ -195,24 +196,39 @@ local resolve_path_if_exists = function (specification)
return false
end
+--[[doc--
+ Custom file resolvers via callback.
+--doc]]--
+
+local resolve_my = function (specification)
+ luatexbase.call_callback ("luaotfload.resolve_font", specification)
+end
+
local resolve_methods = {
tex = resolve_tex_format,
path = resolve_path_if_exists,
name = resolve_name,
+ file = resolve_file,
+ my = resolve_my,
}
local resolve_sequence = function (seq, specification)
for i = 1, #seq do
local id = seq [i]
local mth = resolve_methods [id]
- logreport ("both", 3, "resolve", "step %d: apply method %q (%s)", i, id, mth)
- if mth (specification) == true then
- logreport ("both", 3, "resolve",
- "%d: method %q resolved %q -> %s (%s).",
- i, id, specification.specification,
- specification.name,
- specification.forcedname)
- return true
+ if not mth then
+ logreport ("both", 0, "resolve",
+ "step %d: invalid lookup method %q", i, id)
+ else
+ logreport ("both", 3, "resolve", "step %d: apply method %q (%s)", i, id, mth)
+ if mth (specification) == true then
+ logreport ("both", 3, "resolve",
+ "%d: method %q resolved %q -> %s (%s).",
+ i, id, specification.specification,
+ specification.name,
+ specification.forcedname)
+ return true
+ end
end
end
logreport ("both", 0, "resolve",
@@ -226,7 +242,14 @@ local default_anon_sequence = {
local resolve_anon
resolve_anon = function (specification)
- return resolve_sequence (default_anon_sequence, specification)
+ local seq = default_anon_sequence
+ if config and config.luaotfload then
+ local anonseq = config.luaotfload.run.anon_sequence
+ if anonseq and next (anonseq) then
+ seq = anonseq
+ end
+ end
+ return resolve_sequence (seq, specification)
end
--[[doc--
@@ -259,16 +282,6 @@ resolve_kpse = function (specification)
return false
end
---[[doc--
-
- Also {\bfseries EXPERIMENTAL}: custom file resolvers via callback.
-
---doc]]--
-
-local resolve_my = function (specification)
- luatexbase.call_callback ("luaotfload.resolve_font", specification)
-end
-
return {
init = function ( )
if luatexbase and luatexbase.create_callback then
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua
index b42fe424ae1..cdd3ff34c17 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua
@@ -1,6 +1,6 @@
return {
["hashes"]={
- { "fontloader-2016-04-27.lua", "b205ad7d77fd589e1895c9898182c69e" },
+ { "fontloader-2016-05-04.lua", "f5cc748560f11e24b47446b06d4c7105" },
{ "fontloader-util-fil.lua", "5b05af7415ab0f28cf0f37cb4bfaa0dd" },
{ "fontloader-util-str.lua", "5e01ba9afb7715cbf69aeebaa829e42a" },
{ "fontloader-swiglib-test.lua", "c1cdeff07e5b8896f7aa98ce50c31618" },
@@ -15,17 +15,17 @@ return {
{ "fontloader-l-lpeg.lua", "93b90b22d7d3600ddd9def9f3ad9a7bb" },
{ "fontloader-l-io.lua", "a3292f4dad2705c4eeb1d91c40bd0fde" },
{ "fontloader-l-function.lua", "a7e68a9703c35238729da41a474e951b" },
- { "fontloader-l-file.lua", "bb25347eee3208dbb419e80eb2809e99" },
+ { "fontloader-l-file.lua", "e0af9d75d170a1f62386ed26eb7ad850" },
{ "fontloader-l-boolean.lua", "abe28515dd33e8f6c416c09bca351cf8" },
{ "fontloader-languages.lua", "4e5bbdad336fa4969ac21a5242643a40" },
{ "fontloader-font-osd.lua", "67fc27b4ec499b31941f5a941e55c998" },
- { "fontloader-font-ots.lua", "2dac3c521e78085eacce2a9697f43919" },
+ { "fontloader-font-ots.lua", "e89cde7b48a90e52fd8d612409c614c8" },
{ "fontloader-font-ota.lua", "613dee572209df8e25b7a9aa5a7173e9" },
- { "fontloader-font-otj.lua", "d5cf0497a3bdc08b7911502e5fb91003" },
+ { "fontloader-font-otj.lua", "79bea0740b5102bedc7776255dbe6724" },
{ "fontloader-font-oto.lua", "acff5cbf6b4a1831bb0f567e6b012949" },
- { "fontloader-font-otl.lua", "4ec5c0c37622edc49cd7c0fa33fb4e4c" },
+ { "fontloader-font-otl.lua", "ba04f48a4a5d5c1e86318a169f8c1853" },
{ "fontloader-font-oup.lua", "d716035aa38987a788c1965016f913eb" },
- { "fontloader-font-dsp.lua", "05d720a52d25a9d4271e3e1372637a42" },
+ { "fontloader-font-dsp.lua", "d6c47b8f920d994067bcdd1653d7958f" },
{ "fontloader-font-ttf.lua", "e0893de6d0f3f421ee4386fa90429db8" },
{ "fontloader-font-cff.lua", "84590de32a9d3bcd1e3fee0bb667e9c2" },
{ "fontloader-font-otr.lua", "84b2e945c057993df5016d3833e5c674" },
@@ -45,11 +45,11 @@ return {
{ "fontloader-font-def.lua", "3c71c27300a8cb5c29f5d278d2049fb6" },
{ "fontloader-font-con.lua", "7f28698f84d848b60d2ce8d38315d4af" },
{ "fontloader-font-cid.lua", "52421d1fdaa07ec4b1d936c6ff5079be" },
- { "fontloader-font-afm.lua", "6b7aecde4ba0233606b09e45f49bae1f" },
+ { "fontloader-font-afm.lua", "5ef09530f6523caf718d9f949f5e0b17" },
{ "fontloader-font-afk.lua", "b36a76ceb835f41f8c05b471000ddc14" },
{ "fontloader-data-con.lua", "675f5a0af45ffb3e0d2e2ab5d6c2e47b" },
{ "fontloader-basics-nod.lua", "ecd4eb8a91ac539824a9a72c5b97ded4" },
- { "fontloader-reference.lua", "91ef2ecfed0f1dbe88224f653044f0ad" },
+ { "fontloader-reference.lua", "8b99a5f8c9dfa751005088793ebe005c" },
{ "fontloader-basics-gen.lua", "f48046adcf081e027371e2813382afb2" },
{ "mktests", "918cb50be9ee8bd645ac1a27dc501e8c" },
{ "mkstatus", "6165114a637b03d7bd87c58d9ada8585" },
@@ -58,26 +58,26 @@ return {
{ "mkcharacters", "1db01d8172c49c8a405897dc45340917" },
{ "luaotfload-glyphlist.lua", "ff440162d1b8a78a586375ee65630c21" },
{ "luaotfload-characters.lua", "8d22d2cf4a25d066974bb8760819d8a4" },
- { "luaotfload-tool.lua", "053875a0acce95064df2599d3f533b69" },
- { "luaotfload-resolvers.lua", "0b404e412d444407daec4fccb4e0962b" },
+ { "luaotfload-tool.lua", "45606c01dbd7480a3ff2e5452cebd394" },
+ { "luaotfload-resolvers.lua", "c05fb5bf7b93803f9462ee0111509aa3" },
{ "luaotfload-parsers.lua", "aac54ef728dfe45a19ab22f4e0e858a6" },
- { "luaotfload-main.lua", "f588f700563e68783ce9269c6edb3bc0" },
+ { "luaotfload-main.lua", "f09dc0bdb3e2b9ac060d1c49c63db6ac" },
{ "luaotfload-log.lua", "f598e8242030424227f1eb54ec084820" },
{ "luaotfload-loaders.lua", "8201a481a051515a04d3b605f105f020" },
- { "luaotfload-letterspace.lua", "31a4d0d697e7261c0b6a1b4482b425aa" },
+ { "luaotfload-letterspace.lua", "37da10d6a7e2f2a24fb4841371aafeb6" },
{ "luaotfload-init.lua", "918b4e4ea834a8c23e3e797be2353106" },
- { "luaotfload-features.lua", "da108e646eff3e47529286c691eba80e" },
+ { "luaotfload-features.lua", "74722b12208c0f00dcadefebae57f350" },
{ "luaotfload-diagnostics.lua", "7b35c9f91e3e73fc5a61dbfe1f0e7ad9" },
{ "luaotfload-database.lua", "8ee24cadcb961cb80f923e79061e31e9" },
- { "luaotfload-configuration.lua", "8b7e75c4af2d63d5db8ba8e2e0b26eea" },
+ { "luaotfload-configuration.lua", "050de6384c15def494893add22a46517" },
{ "luaotfload-colors.lua", "4164cc10b40e87285775ff173efc9417" },
- { "luaotfload-auxiliary.lua", "e1a10f22b5e474b1066196ca2b9ae2d8" },
+ { "luaotfload-auxiliary.lua", "801362da3d659fbbb60b15b2e110c913" },
},
["notes"]={
["committer"]="Philipp Gesang <phg@phi-gamma.net>",
- ["description"]="v2.7-fix-1",
- ["loader"]="fontloader-2016-04-27.lua",
- ["revision"]="23ff1b009f3b4df6754848196d7556c11c323d83",
- ["timestamp"]="2016-04-27 22:58:36 +0200",
+ ["description"]="v2.7-fix-2",
+ ["loader"]="fontloader-2016-05-04.lua",
+ ["revision"]="0ba71246a7445204a457602806f9cc80c0cbe354",
+ ["timestamp"]="2016-05-04 21:49:57 +0200",
},
} \ No newline at end of file