summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-10-07 11:15:06 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-10-07 11:15:06 +0200
commit961f357ef202a44da1f4b315c82ef143a6f51497 (patch)
tree223ba0e720367452bcb7c906850430a660bbf74c
parentd81d584da5152af05c07f7842054a926aae20e10 (diff)
downloadcontext-961f357ef202a44da1f4b315c82ef143a6f51497.tar.gz
2015-10-06 12:51:00
-rw-r--r--doc/context/scripts/mkiv/mtx-plain.html53
-rw-r--r--doc/context/scripts/mkiv/mtx-plain.man42
-rw-r--r--doc/context/scripts/mkiv/mtx-plain.xml20
-rw-r--r--doc/context/scripts/mkiv/mtx-update.html1
-rw-r--r--doc/context/scripts/mkiv/mtx-update.man3
-rw-r--r--doc/context/scripts/mkiv/mtx-update.xml1
-rw-r--r--scripts/context/lua/mtx-context.lua106
-rw-r--r--scripts/context/lua/mtx-plain.lua3
-rw-r--r--scripts/context/lua/mtx-update.lua62
-rw-r--r--scripts/context/lua/mtxrun.lua28
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua28
-rw-r--r--scripts/context/stubs/unix/mtxrun28
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua28
-rw-r--r--tex/context/base/cont-new.mkiv5
-rw-r--r--tex/context/base/context-version.pdfbin4187 -> 4190 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-lib.mkvi12
-rw-r--r--tex/context/base/font-otl.lua2
-rw-r--r--tex/context/base/font-otr.lua727
-rw-r--r--tex/context/base/font-oup.lua85
-rw-r--r--tex/context/base/luat-fmt.lua25
-rw-r--r--tex/context/base/m-oldotf.mkiv83
-rw-r--r--tex/context/base/status-files.pdfbin24418 -> 24390 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin256324 -> 255896 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
25 files changed, 802 insertions, 544 deletions
diff --git a/doc/context/scripts/mkiv/mtx-plain.html b/doc/context/scripts/mkiv/mtx-plain.html
deleted file mode 100644
index d7600397a..000000000
--- a/doc/context/scripts/mkiv/mtx-plain.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<!-- compare with lmx framework variant -->
-
-<!--
- filename : context-base.xml
- comment : companion to mtx-server-ctx-startup.tex
- author : Hans Hagen, PRAGMA-ADE, Hasselt NL
- copyright: PRAGMA ADE / ConTeXt Development Team
- license : see context related readme files
--->
-
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <title>Plain TeX Runner 1.00</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <style type="text/css">
- body { color: #FFFFFF; background-color: #808080; font-family: optima, verdana, futura, "lucida sans", arial, geneva, helvetica, sans; font-size: 12px; line-height: 18px; } a:link, a:active, a:visited { color: #FFFFFF; } a.dir-view:link, a.dir-view:active, a.dir-view:visited { color: #FFFFFF; text-decoration: underline; } .valid { color: #00FF00; } .invalid { color: #FF0000; } button, .commonlink, .smallbutton { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; border-color: #7F7F7F; border-style: solid; border-width: .125ex; background-color: #FFFFFF; padding: .5ex; } .smallbutton { width: 1em; } a.commonlink:link, a.commonlink:active, a.commonlink:visited, a.smalllink:link, a.smalllink:active, a.smalllink:visited { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; } h1, .title { font-style: normal; font-weight: normal; font-size: 18px; line-height: 18px; margin-bottom: 20px; } h2, .subtitle { font-style: normal; font-weight: normal; font-size: 12px; margin-top: 18px; margin-bottom: 18px; } table { line-height: 18px; font-size: 12px; margin: 0; } th { font-weight: bold; text-align: left; padding-bottom: 6px; } .tc { font-weight: bold; text-align: left; } p, li { max-width: 60em; } .empty-line { margin-top: 4px; } .more-room { margin-right: 1.5em; } .much-more-room { margin-right: 3em; } #main { position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; z-index: 2; width: 80%; height: 80%; padding: 0%; margin: 0%; overflow: auto; border-style: none; border-width: 0; background-color: #3F3F3F; } #main-settings { margin: 12px; x_max-width: 60em; line-height: 18px; font-size: 12px; } #left { position: absolute; top : 10%; left: 0%; bottom: 0%; right: 90%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; } #right { position: absolute; top : 0%; left: 90%; bottom: 10%; right: 0%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; _margin-left: -15px; } #bottom { position: absolute; left: 10%; right: 0%; top: 90%; bottom: 0%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top { position: absolute; left: 0%; right: 10%; top: 0%; bottom: 90%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #top-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: right; vertical-align: middle; } #bottom-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #bottom-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: left; vertical-align: middle; } #left-one { position: absolute; width: 100%; buggedheight: 100%; } #left-two { position: relative; margin-top: 12px; line-height: 18px; text-align: center; vertical-align: top; } #right-one { display: table; height: 100%; width: 100%; } #right-two { display: table-row; height: 100%; width: 100%; } #right-three { display: table-cell; width: 100%; vertical-align: bottom; _position: absolute; _top: 100%; } #right-four { text-align: center; margin-bottom: 2ex; _position: relative; _top: -100%; } #more-top { position: absolute; top: 0%; left: 90%; bottom: 90%; right: 0%; z-index: 3; width: 10%; height: 10%; padding: 0%; margin: 0%; border-style: none; border-width: 0; } #more-top-settings { text-align: center; } #more-right-settings { margin-right: 12px; margin-left: 12px; line-height: 18px; font-size: 10px; text-align: center; } #right-safari { _display: table; width: 100%; height: 100%; }
- </style>
- <style type="text/css">
- </style>
- </head>
- <body>
- <div id="top"> <div id="top-one">
- <div id="top-two">Plain TeX Runner 1.00 </div>
- </div>
- </div>
- <div id="bottom"> <div id="bottom-one">
- <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl</div>
- </div>
- </div>
- <div id="left"></div>
- <div id="right"></div>
- <div id="main">
- <div id='main-settings'>
- <h1>Command line options</h1>
-<table>
- <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
- <tr><th/><td/><td/></tr>
- <tr><th>--make</th><td></td><td>create format file</td></tr>
- <tr><th>--fonts</th><td></td><td>create plain font database</td></tr>
- <tr><th>--run</th><td></td><td>process file</td></tr>
- <tr><th>--format</th><td>string</td><td>format name (default: luatex-plain)</td></tr>
- <tr><th>--engine</th><td>string</td><td>engine to use (default: luatex)</td></tr>
- <tr><th>--jit</th><td></td><td>use luajittex</td></tr>
- </table>
-<br/>
- </div>
- </div>
- </body>
- </html>
diff --git a/doc/context/scripts/mkiv/mtx-plain.man b/doc/context/scripts/mkiv/mtx-plain.man
deleted file mode 100644
index c2e0e0bd9..000000000
--- a/doc/context/scripts/mkiv/mtx-plain.man
+++ /dev/null
@@ -1,42 +0,0 @@
-.TH "mtx-plain" "1" "01-01-2015" "version 1.00" "Plain TeX Runner"
-.SH NAME
-.B mtx-plain
-.SH SYNOPSIS
-.B mtxrun --script plain [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B Plain TeX Runner
-.SH OPTIONS
-.TP
-.B --make
-create format file
-.TP
-.B --fonts
-create plain font database
-.TP
-.B --run
-process file
-.TP
-.B --format=string
-format name (default: luatex-plain)
-.TP
-.B --engine=string
-engine to use (default: luatex)
-.TP
-.B --jit
-use luajittex
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net
diff --git a/doc/context/scripts/mkiv/mtx-plain.xml b/doc/context/scripts/mkiv/mtx-plain.xml
deleted file mode 100644
index a0d73279e..000000000
--- a/doc/context/scripts/mkiv/mtx-plain.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
- <entry name="name">mtx-plain</entry>
- <entry name="detail">Plain TeX Runner</entry>
- <entry name="version">1.00</entry>
- </metadata>
- <flags>
- <category name="basic">
- <subcategory>
- <flag name="make"><short>create format file</short></flag>
- <flag name="fonts"><short>create plain font database</short></flag>
- <flag name="run"><short>process file</short></flag>
- <flag name="format" value="string"><short>format name (default: luatex-plain)</short></flag>
- <flag name="engine" value="string"><short>engine to use (default: luatex)</short></flag>
- <flag name="jit"><short>use luajittex</short></flag>
- </subcategory>
- </category>
- </flags>
-</application>
diff --git a/doc/context/scripts/mkiv/mtx-update.html b/doc/context/scripts/mkiv/mtx-update.html
index 1cc6bd3af..feae398ec 100644
--- a/doc/context/scripts/mkiv/mtx-update.html
+++ b/doc/context/scripts/mkiv/mtx-update.html
@@ -57,6 +57,7 @@
<tr><th>--state</th><td></td><td>update tree using saved state</td></tr>
<tr><th>--cygwin</th><td></td><td>adapt drive specs to cygwin</td></tr>
<tr><th>--mingw</th><td></td><td>assume mingw binaries being used</td></tr>
+ <tr><th>--silent</th><td></td><td>less (or no) logging</td></tr>
</table>
<br/>
</div>
diff --git a/doc/context/scripts/mkiv/mtx-update.man b/doc/context/scripts/mkiv/mtx-update.man
index e27c2ab43..0e3dbcc77 100644
--- a/doc/context/scripts/mkiv/mtx-update.man
+++ b/doc/context/scripts/mkiv/mtx-update.man
@@ -64,6 +64,9 @@ adapt drive specs to cygwin
.TP
.B --mingw
assume mingw binaries being used
+.TP
+.B --silent
+less (or no) logging
.SH AUTHOR
More information about ConTeXt and the tools that come with it can be found at:
diff --git a/doc/context/scripts/mkiv/mtx-update.xml b/doc/context/scripts/mkiv/mtx-update.xml
index c5d9205c3..00be476fb 100644
--- a/doc/context/scripts/mkiv/mtx-update.xml
+++ b/doc/context/scripts/mkiv/mtx-update.xml
@@ -26,6 +26,7 @@
<flag name="state"><short>update tree using saved state</short></flag>
<flag name="cygwin"><short>adapt drive specs to cygwin</short></flag>
<flag name="mingw"><short>assume mingw binaries being used</short></flag>
+ <flag name="silent"><short>less (or no) logging</short></flag>
</subcategory>
</category>
</flags>
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index cb76a0106..3c78532d8 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -960,13 +960,109 @@ function scripts.context.pipe() -- still used?
end
local function make_mkiv_format(name,engine)
- environment.make_format(name) -- jit is picked up later
+ environment.make_format(name,environment.arguments.silent) -- jit is picked up later
end
-local function make_mkii_format(name,engine)
- local command = format("mtxrun texexec.rb --make %s --%s",name,engine)
- report("running command: %s",command)
- os.spawn(command)
+local make_mkii_format
+
+do -- more or less copied from mtx-plain.lua:
+
+ local function mktexlsr()
+ if environment.arguments.silent then
+ local result = os.execute("mktexlsr --quiet > temp.log")
+ if result ~= 0 then
+ print("mktexlsr silent run > fatal error") -- we use a basic print
+ else
+ print("mktexlsr silent run") -- we use a basic print
+ end
+ os.remove("temp.log")
+ else
+ report("running mktexlsr")
+ os.execute("mktexlsr")
+ end
+ end
+
+ local function engine(texengine,texformat)
+ local command = string.format('%s --ini --etex --8bit %s \\dump',texengine,file.addsuffix(texformat,"mkii"))
+ if environment.arguments.silent then
+ statistics.starttiming()
+ local command = format("%s > temp.log",command)
+ local result = os.execute(command)
+ local runtime = statistics.stoptiming()
+ if result ~= 0 then
+ print(format("%s silent make > fatal error when making format %q",texengine,texformat)) -- we use a basic print
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",texengine,texformat,runtime)) -- we use a basic print
+ end
+ os.remove("temp.log")
+ else
+ report("running command: %s",command)
+ os.execute(command)
+ end
+ end
+
+ local function resultof(...)
+ local command = string.format(...)
+ report("running command %a",command)
+ return string.strip(os.resultof(command) or "")
+ end
+
+ local function make(texengine,texformat)
+ report("generating kpse file database")
+ mktexlsr()
+ local fmtpathspec = resultof("kpsewhich --var-value=TEXFORMATS --engine=%s",texengine)
+ if fmtpathspec ~= "" then
+ report("using path specification %a",fmtpathspec)
+ fmtpathspec = resultof('kpsewhich -expand-braces="%s"',fmtpathspec)
+ end
+ if fmtpathspec ~= "" then
+ report("using path expansion %a",fmtpathspec)
+ else
+ report("no valid path reported, trying alternative")
+ fmtpathspec = resultof("kpsewhich --show-path=fmt --engine=%s",texengine)
+ if fmtpathspec ~= "" then
+ report("using path expansion %a",fmtpathspec)
+ else
+ report("no valid path reported, falling back to current path")
+ fmtpathspec = "."
+ end
+ end
+ fmtpathspec = string.splitlines(fmtpathspec)[1] or fmtpathspec
+ fmtpathspec = file.splitpath(fmtpathspec)
+ local fmtpath = nil
+ for i=1,#fmtpathspec do
+ local path = fmtpathspec[i]
+ if path ~= "." then
+ dir.makedirs(path)
+ if lfs.isdir(path) and file.is_writable(path) then
+ fmtpath = path
+ break
+ end
+ end
+ end
+ if not fmtpath or fmtpath == "" then
+ fmtpath = "."
+ else
+ lfs.chdir(fmtpath)
+ end
+ engine(texengine,texformat)
+ report("generating kpse file database")
+ mktexlsr()
+ report("format %a saved on path %a",texformat,fmtpath)
+ end
+
+ local function run(texengine,texformat,filename)
+ local t = { }
+ for k, v in next, environment.arguments do
+ t[#t+1] = string.format("--mtx:%s=%s",k,v)
+ end
+ execute('%s --fmt=%s %s "%s"',texengine,file.removesuffix(texformat),table.concat(t," "),filename)
+ end
+
+ make_mkii_format = function(name,engine)
+ make(engine,name)
+ end
+
end
function scripts.context.generate()
diff --git a/scripts/context/lua/mtx-plain.lua b/scripts/context/lua/mtx-plain.lua
index 1076572fc..de62b19ea 100644
--- a/scripts/context/lua/mtx-plain.lua
+++ b/scripts/context/lua/mtx-plain.lua
@@ -49,7 +49,7 @@ scripts.plain = scripts.plain or { }
local function execute(...)
local command = string.format(...)
report("running command %a\n",command)
- os.execute(command)
+ return os.execute(command)
end
local function resultof(...)
@@ -91,6 +91,7 @@ function scripts.plain.make(texengine,texformat)
end
end
end
+ local fmtpath = --expand-path $safe-out-name=$TEXFORMATS
if not fmtpath or fmtpath == "" then
fmtpath = "."
else
diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua
index daf4f5b16..8a23ba9a6 100644
--- a/scripts/context/lua/mtx-update.lua
+++ b/scripts/context/lua/mtx-update.lua
@@ -42,6 +42,7 @@ local helpinfo = [[
<flag name="state"><short>update tree using saved state</short></flag>
<flag name="cygwin"><short>adapt drive specs to cygwin</short></flag>
<flag name="mingw"><short>assume mingw binaries being used</short></flag>
+ <flag name="silent"><short>less (or no) logging</short></flag>
</subcategory>
</category>
</flags>
@@ -84,10 +85,10 @@ scripts.update.texformats = {
"plain"
}
-scripts.update.mpformats = {
- -- "metafun",
- -- "mpost",
-}
+-- scripts.update.mpformats = {
+-- -- "metafun",
+-- -- "mpost",
+-- }
-- experimental is not functional at the moment
@@ -280,6 +281,8 @@ function scripts.update.synchronize()
local fonts = states.get("fonts") -- fonts (experimental or special)
local goodies = states.get("goodies") -- goodies (like editors)
local force = environment.argument("force")
+ local silent = environment.argument("silent") and "--silent" or ""
+ local quiet = silent == "" and "" or "--quiet"
bin = gsub(bin,"\\","/")
@@ -517,9 +520,9 @@ function scripts.update.synchronize()
resolvers.load_tree(texroot) -- else we operate in the wrong tree
-- update filename database for pdftex/xetex
- scripts.update.run(format('mtxrun --tree="%s" --direct --resolve mktexlsr',texroot))
+ scripts.update.run(format('mtxrun --tree="%s" %s --direct --resolve mktexlsr %s',texroot,silent,quiet))
-- update filename database for luatex
- scripts.update.run(format('mtxrun --tree="%s" --generate',texroot))
+ scripts.update.run(format('mtxrun --tree="%s" %s --generate',texroot,silent))
report("update, done")
end
@@ -538,6 +541,8 @@ function scripts.update.make()
report("make, start")
local force = environment.argument("force")
+ local silent = environment.argument("silent") and "--silent" or ""
+ local quiet = silent == "" and "" or "--quiet"
local texroot = scripts.update.fullpath(states.get("paths.root"))
local engines = states.get('engines')
local goodies = states.get('goodies')
@@ -546,43 +551,44 @@ function scripts.update.make()
resolvers.load_tree(texroot)
- scripts.update.run(format('mtxrun --tree="%s" --direct --resolve mktexlsr',texroot))
- scripts.update.run(format('mtxrun --tree="%s" --generate',texroot))
+ scripts.update.run(format('mtxrun --tree="%s" %s --direct --resolve mktexlsr %s',texroot,silent,quiet))
+ scripts.update.run(format('mtxrun --tree="%s" %s --generate',texroot,silent))
local askedformats = formats
local texformats = table.tohash(scripts.update.texformats)
- local mpformats = table.tohash(scripts.update.mpformats)
+ -- local mpformats = table.tohash(scripts.update.mpformats)
for k,v in table.sortedhash(texformats) do
if not askedformats[k] then
texformats[k] = nil
end
end
- for k,v in table.sortedhash(mpformats) do
- if not askedformats[k] then
- mpformats[k] = nil
- end
- end
+ -- for k,v in table.sortedhash(mpformats) do
+ -- if not askedformats[k] then
+ -- mpformats[k] = nil
+ -- end
+ -- end
local formatlist = concat(table.fromhash(texformats), " ")
if formatlist ~= "" then
for engine in table.sortedhash(engines) do
if engine == "luatex" or engine == "luajittex" then
- scripts.update.run(format('mtxrun --tree="%s" --script context --autogenerate --make',texroot))
- scripts.update.run(format('mtxrun --tree="%s" --script context --autogenerate --make --engine=luajittex',texroot))
+ scripts.update.run(format('mtxrun --tree="%s" %s --script context --autogenerate --make %s',texroot,silent,silent))
+ scripts.update.run(format('mtxrun --tree="%s" %s --script context --autogenerate --make --engine=luajittex %s',texroot,silent,silent))
else
- scripts.update.run(format('mtxrun --tree="%s" --script texexec --make --all --%s %s',texroot,engine,formatlist))
+ -- scripts.update.run(format('mtxrun --tree="%s" %s --script texexec --make --all %s --%s %s',texroot,silent,silent,engine,formatlist))
+ scripts.update.run(format('mtxrun --tree="%s" --resolve %s --script context --resolve --make %s --engine=%s %s',texroot,silent,silent,engine,formatlist))
end
end
end
- local formatlist = concat(table.fromhash(mpformats), " ")
- if formatlist ~= "" then
- scripts.update.run(format('mtxrun --tree="%s" --script texexec --make --all %s',texroot,formatlist))
- end
+ -- local formatlist = concat(table.fromhash(mpformats), " ")
+ -- if formatlist ~= "" then
+ -- scripts.update.run(format('mtxrun --tree="%s" %s --script texexec --make --all %s %s',texroot,silent,silent,formatlist))
+ -- end
if not force then
report("make, use --force to really make formats")
end
- scripts.update.run(format('mtxrun --tree="%s" --direct --resolve mktexlsr',texroot)) -- needed for mpost
- scripts.update.run(format('mtxrun --tree="%s" --generate',texroot))
+ -- scripts.update.run(format('mtxrun --tree="%s" %s --direct --resolve mktexlsr',texroot,silent)) -- needed for mpost
+ scripts.update.run(format('mtxrun --tree="%s" %s --generate',texroot,silent))
report("make, done")
end
@@ -649,14 +655,14 @@ if scripts.savestate then
for r in gmatch(environment.argument("formats") or "","([^, ]+)") do
if valid[r] then states.set("formats." .. r, true) end
end
- local valid = table.tohash(scripts.update.mpformats)
- for r in gmatch(environment.argument("formats") or "","([^, ]+)") do
- if valid[r] then states.set("formats." .. r, true) end
- end
+ -- local valid = table.tohash(scripts.update.mpformats)
+ -- for r in gmatch(environment.argument("formats") or "","([^, ]+)") do
+ -- if valid[r] then states.set("formats." .. r, true) end
+ -- end
states.set("formats.cont-en", true)
states.set("formats.cont-nl", true)
- states.set("formats.metafun", true)
+ -- states.set("formats.metafun", true)
for r in gmatch(environment.argument("extras") or "","([^, ]+)") do -- for old times sake
if r ~= "all" and not find(r,"^[a-z]%-") then
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 724480e5e..04b2294cb 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -18197,7 +18197,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 6095, stripped down to: 5035
+-- original size: 6967, stripped down to: 5631
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -18226,7 +18226,7 @@ local function primaryflags()
end
return concat(flags," ")
end
-function environment.make_format(name)
+function environment.make_format(name,silent)
local engine=environment.ownmain or "luatex"
local olddir=dir.current()
local path=caches.getwritablepath("formats",engine) or ""
@@ -18283,9 +18283,23 @@ function environment.make_format(name)
lfs.chdir(olddir)
return
end
- local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform=="unix" and "\\\\" or "\\")
- report_format("running command: %s\n",command)
- os.execute(command)
+ local dump=os.platform=="unix" and "\\\\dump" or "\\dump"
+ if silent then
+ statistics.starttiming()
+ local command=format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ local result=os.execute(command)
+ local runtime=statistics.stoptiming()
+ if result~=0 then
+ print(format("%s silent make > fatal error when making format %q",engine,name))
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime))
+ end
+ os.remove("temp.log")
+ else
+ local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ report_format("running command: %s\n",command)
+ os.execute(command)
+ end
local pattern=file.removesuffix(file.basename(usedluastub)).."-*.mem"
local mp=dir.glob(pattern)
if mp then
@@ -18331,8 +18345,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 780760
--- stripped bytes : 282936
+-- original bytes : 781632
+-- stripped bytes : 283212
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 724480e5e..04b2294cb 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -18197,7 +18197,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 6095, stripped down to: 5035
+-- original size: 6967, stripped down to: 5631
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -18226,7 +18226,7 @@ local function primaryflags()
end
return concat(flags," ")
end
-function environment.make_format(name)
+function environment.make_format(name,silent)
local engine=environment.ownmain or "luatex"
local olddir=dir.current()
local path=caches.getwritablepath("formats",engine) or ""
@@ -18283,9 +18283,23 @@ function environment.make_format(name)
lfs.chdir(olddir)
return
end
- local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform=="unix" and "\\\\" or "\\")
- report_format("running command: %s\n",command)
- os.execute(command)
+ local dump=os.platform=="unix" and "\\\\dump" or "\\dump"
+ if silent then
+ statistics.starttiming()
+ local command=format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ local result=os.execute(command)
+ local runtime=statistics.stoptiming()
+ if result~=0 then
+ print(format("%s silent make > fatal error when making format %q",engine,name))
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime))
+ end
+ os.remove("temp.log")
+ else
+ local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ report_format("running command: %s\n",command)
+ os.execute(command)
+ end
local pattern=file.removesuffix(file.basename(usedluastub)).."-*.mem"
local mp=dir.glob(pattern)
if mp then
@@ -18331,8 +18345,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 780760
--- stripped bytes : 282936
+-- original bytes : 781632
+-- stripped bytes : 283212
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 724480e5e..04b2294cb 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -18197,7 +18197,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 6095, stripped down to: 5035
+-- original size: 6967, stripped down to: 5631
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -18226,7 +18226,7 @@ local function primaryflags()
end
return concat(flags," ")
end
-function environment.make_format(name)
+function environment.make_format(name,silent)
local engine=environment.ownmain or "luatex"
local olddir=dir.current()
local path=caches.getwritablepath("formats",engine) or ""
@@ -18283,9 +18283,23 @@ function environment.make_format(name)
lfs.chdir(olddir)
return
end
- local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform=="unix" and "\\\\" or "\\")
- report_format("running command: %s\n",command)
- os.execute(command)
+ local dump=os.platform=="unix" and "\\\\dump" or "\\dump"
+ if silent then
+ statistics.starttiming()
+ local command=format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ local result=os.execute(command)
+ local runtime=statistics.stoptiming()
+ if result~=0 then
+ print(format("%s silent make > fatal error when making format %q",engine,name))
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime))
+ end
+ os.remove("temp.log")
+ else
+ local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ report_format("running command: %s\n",command)
+ os.execute(command)
+ end
local pattern=file.removesuffix(file.basename(usedluastub)).."-*.mem"
local mp=dir.glob(pattern)
if mp then
@@ -18331,8 +18345,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 780760
--- stripped bytes : 282936
+-- original bytes : 781632
+-- stripped bytes : 283212
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 724480e5e..04b2294cb 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -18197,7 +18197,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["luat-fmt"] = package.loaded["luat-fmt"] or true
--- original size: 6095, stripped down to: 5035
+-- original size: 6967, stripped down to: 5631
if not modules then modules={} end modules ['luat-fmt']={
version=1.001,
@@ -18226,7 +18226,7 @@ local function primaryflags()
end
return concat(flags," ")
end
-function environment.make_format(name)
+function environment.make_format(name,silent)
local engine=environment.ownmain or "luatex"
local olddir=dir.current()
local path=caches.getwritablepath("formats",engine) or ""
@@ -18283,9 +18283,23 @@ function environment.make_format(name)
lfs.chdir(olddir)
return
end
- local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform=="unix" and "\\\\" or "\\")
- report_format("running command: %s\n",command)
- os.execute(command)
+ local dump=os.platform=="unix" and "\\\\dump" or "\\dump"
+ if silent then
+ statistics.starttiming()
+ local command=format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ local result=os.execute(command)
+ local runtime=statistics.stoptiming()
+ if result~=0 then
+ print(format("%s silent make > fatal error when making format %q",engine,name))
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime))
+ end
+ os.remove("temp.log")
+ else
+ local command=format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ report_format("running command: %s\n",command)
+ os.execute(command)
+ end
local pattern=file.removesuffix(file.basename(usedluastub)).."-*.mem"
local mp=dir.glob(pattern)
if mp then
@@ -18331,8 +18345,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 780760
--- stripped bytes : 282936
+-- original bytes : 781632
+-- stripped bytes : 283212
-- end library merge
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 3f12041ba..85019650e 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,12 +11,13 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2015.10.04 19:25}
+\newcontextversion{2015.10.06 12:49}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
-\usemodule[newotf]
+% \usemodule[newotf]
+\usemodule[oldotf]
\unprotect
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index d898fe588..9c67c56ea 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index dd7320992..f529eec31 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2015.10.04 19:25}
+\edef\contextversion{2015.10.06 12:49}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-lib.mkvi b/tex/context/base/font-lib.mkvi
index a40f8905a..46de6ee44 100644
--- a/tex/context/base/font-lib.mkvi
+++ b/tex/context/base/font-lib.mkvi
@@ -47,8 +47,8 @@
\registerctxluafile{font-oti}{1.001} % otf initialization
\registerctxluafile{font-ott}{1.001} % otf tables (first)
-% \iffalse % use new loader
-\iftrue % use old loader
+\iffalse % use new loader
+% \iftrue % use old loader
\registerctxluafile{font-otf}{1.001} % otf main
\registerctxluafile{font-otb}{1.001} % otf main base
@@ -65,10 +65,18 @@
\registerctxluafile{font-otl}{1.001} % otf replacement
\registerctxluafile{font-oto}{1.001} % otb replacement
+\doifelsefile{font-otj-new.lua} {
+ \registerctxluafile{font-otj-new}{1.001} % inj replacement
+} {
\registerctxluafile{font-otj}{1.001} % inj replacement
+}
\registerctxluafile{font-oup}{1.001} % otp replacement
\registerctxluafile{font-ota}{1.001}
+\doifelsefile{font-ots-new.lua} {
+ \registerctxluafile{font-ots-new}{1.001} % otn replacement
+} {
\registerctxluafile{font-ots}{1.001} % otn replacement
+}
\registerctxluafile{font-otd}{1.001}
\registerctxluafile{font-otc}{1.001}
\registerctxluafile{font-oth}{1.001}
diff --git a/tex/context/base/font-otl.lua b/tex/context/base/font-otl.lua
index 5a4831835..9058f78c2 100644
--- a/tex/context/base/font-otl.lua
+++ b/tex/context/base/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.003 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.004 -- 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/tex/context/base/font-otr.lua b/tex/context/base/font-otr.lua
index 0f22fae5d..49b4565c6 100644
--- a/tex/context/base/font-otr.lua
+++ b/tex/context/base/font-otr.lua
@@ -258,334 +258,334 @@ local languages = {
-- english can stay:
macintosh = {
[ 0] = "english",
- [ 1] = "french",
- [ 2] = "german",
- [ 3] = "italian",
- [ 4] = "dutch",
- [ 5] = "swedish",
- [ 6] = "spanish",
- [ 7] = "danish",
- [ 8] = "portuguese",
- [ 9] = "norwegian",
- [ 10] = "hebrew",
- [ 11] = "japanese",
- [ 12] = "arabic",
- [ 13] = "finnish",
- [ 14] = "greek",
- [ 15] = "icelandic",
- [ 16] = "maltese",
- [ 17] = "turkish",
- [ 18] = "croatian",
- [ 19] = "chinese (traditional)",
- [ 20] = "urdu",
- [ 21] = "hindi",
- [ 22] = "thai",
- [ 23] = "korean",
- [ 24] = "lithuanian",
- [ 25] = "polish",
- [ 26] = "hungarian",
- [ 27] = "estonian",
- [ 28] = "latvian",
- [ 29] = "sami",
- [ 30] = "faroese",
- [ 31] = "farsi/persian",
- [ 32] = "russian",
- [ 33] = "chinese (simplified)",
- [ 34] = "flemish",
- [ 35] = "irish gaelic",
- [ 36] = "albanian",
- [ 37] = "romanian",
- [ 38] = "czech",
- [ 39] = "slovak",
- [ 40] = "slovenian",
- [ 41] = "yiddish",
- [ 42] = "serbian",
- [ 43] = "macedonian",
- [ 44] = "bulgarian",
- [ 45] = "ukrainian",
- [ 46] = "byelorussian",
- [ 47] = "uzbek",
- [ 48] = "kazakh",
- [ 49] = "azerbaijani (cyrillic script)",
- [ 50] = "azerbaijani (arabic script)",
- [ 51] = "armenian",
- [ 52] = "georgian",
- [ 53] = "moldavian",
- [ 54] = "kirghiz",
- [ 55] = "tajiki",
- [ 56] = "turkmen",
- [ 57] = "mongolian (mongolian script)",
- [ 58] = "mongolian (cyrillic script)",
- [ 59] = "pashto",
- [ 60] = "kurdish",
- [ 61] = "kashmiri",
- [ 62] = "sindhi",
- [ 63] = "tibetan",
- [ 64] = "nepali",
- [ 65] = "sanskrit",
- [ 66] = "marathi",
- [ 67] = "bengali",
- [ 68] = "assamese",
- [ 69] = "gujarati",
- [ 70] = "punjabi",
- [ 71] = "oriya",
- [ 72] = "malayalam",
- [ 73] = "kannada",
- [ 74] = "tamil",
- [ 75] = "telugu",
- [ 76] = "sinhalese",
- [ 77] = "burmese",
- [ 78] = "khmer",
- [ 79] = "lao",
- [ 80] = "vietnamese",
- [ 81] = "indonesian",
- [ 82] = "tagalong",
- [ 83] = "malay (roman script)",
- [ 84] = "malay (arabic script)",
- [ 85] = "amharic",
- [ 86] = "tigrinya",
- [ 87] = "galla",
- [ 88] = "somali",
- [ 89] = "swahili",
- [ 90] = "kinyarwanda/ruanda",
- [ 91] = "rundi",
- [ 92] = "nyanja/chewa",
- [ 93] = "malagasy",
- [ 94] = "esperanto",
- [128] = "welsh",
- [129] = "basque",
- [130] = "catalan",
- [131] = "latin",
- [132] = "quenchua",
- [133] = "guarani",
- [134] = "aymara",
- [135] = "tatar",
- [136] = "uighur",
- [137] = "dzongkha",
- [138] = "javanese (roman script)",
- [139] = "sundanese (roman script)",
- [140] = "galician",
- [141] = "afrikaans",
- [142] = "breton",
- [143] = "inuktitut",
- [144] = "scottish gaelic",
- [145] = "manx gaelic",
- [146] = "irish gaelic (with dot above)",
- [147] = "tongan",
- [148] = "greek (polytonic)",
- [149] = "greenlandic",
- [150] = "azerbaijani (roman script)",
+ -- [ 1] = "french",
+ -- [ 2] = "german",
+ -- [ 3] = "italian",
+ -- [ 4] = "dutch",
+ -- [ 5] = "swedish",
+ -- [ 6] = "spanish",
+ -- [ 7] = "danish",
+ -- [ 8] = "portuguese",
+ -- [ 9] = "norwegian",
+ -- [ 10] = "hebrew",
+ -- [ 11] = "japanese",
+ -- [ 12] = "arabic",
+ -- [ 13] = "finnish",
+ -- [ 14] = "greek",
+ -- [ 15] = "icelandic",
+ -- [ 16] = "maltese",
+ -- [ 17] = "turkish",
+ -- [ 18] = "croatian",
+ -- [ 19] = "chinese (traditional)",
+ -- [ 20] = "urdu",
+ -- [ 21] = "hindi",
+ -- [ 22] = "thai",
+ -- [ 23] = "korean",
+ -- [ 24] = "lithuanian",
+ -- [ 25] = "polish",
+ -- [ 26] = "hungarian",
+ -- [ 27] = "estonian",
+ -- [ 28] = "latvian",
+ -- [ 29] = "sami",
+ -- [ 30] = "faroese",
+ -- [ 31] = "farsi/persian",
+ -- [ 32] = "russian",
+ -- [ 33] = "chinese (simplified)",
+ -- [ 34] = "flemish",
+ -- [ 35] = "irish gaelic",
+ -- [ 36] = "albanian",
+ -- [ 37] = "romanian",
+ -- [ 38] = "czech",
+ -- [ 39] = "slovak",
+ -- [ 40] = "slovenian",
+ -- [ 41] = "yiddish",
+ -- [ 42] = "serbian",
+ -- [ 43] = "macedonian",
+ -- [ 44] = "bulgarian",
+ -- [ 45] = "ukrainian",
+ -- [ 46] = "byelorussian",
+ -- [ 47] = "uzbek",
+ -- [ 48] = "kazakh",
+ -- [ 49] = "azerbaijani (cyrillic script)",
+ -- [ 50] = "azerbaijani (arabic script)",
+ -- [ 51] = "armenian",
+ -- [ 52] = "georgian",
+ -- [ 53] = "moldavian",
+ -- [ 54] = "kirghiz",
+ -- [ 55] = "tajiki",
+ -- [ 56] = "turkmen",
+ -- [ 57] = "mongolian (mongolian script)",
+ -- [ 58] = "mongolian (cyrillic script)",
+ -- [ 59] = "pashto",
+ -- [ 60] = "kurdish",
+ -- [ 61] = "kashmiri",
+ -- [ 62] = "sindhi",
+ -- [ 63] = "tibetan",
+ -- [ 64] = "nepali",
+ -- [ 65] = "sanskrit",
+ -- [ 66] = "marathi",
+ -- [ 67] = "bengali",
+ -- [ 68] = "assamese",
+ -- [ 69] = "gujarati",
+ -- [ 70] = "punjabi",
+ -- [ 71] = "oriya",
+ -- [ 72] = "malayalam",
+ -- [ 73] = "kannada",
+ -- [ 74] = "tamil",
+ -- [ 75] = "telugu",
+ -- [ 76] = "sinhalese",
+ -- [ 77] = "burmese",
+ -- [ 78] = "khmer",
+ -- [ 79] = "lao",
+ -- [ 80] = "vietnamese",
+ -- [ 81] = "indonesian",
+ -- [ 82] = "tagalong",
+ -- [ 83] = "malay (roman script)",
+ -- [ 84] = "malay (arabic script)",
+ -- [ 85] = "amharic",
+ -- [ 86] = "tigrinya",
+ -- [ 87] = "galla",
+ -- [ 88] = "somali",
+ -- [ 89] = "swahili",
+ -- [ 90] = "kinyarwanda/ruanda",
+ -- [ 91] = "rundi",
+ -- [ 92] = "nyanja/chewa",
+ -- [ 93] = "malagasy",
+ -- [ 94] = "esperanto",
+ -- [128] = "welsh",
+ -- [129] = "basque",
+ -- [130] = "catalan",
+ -- [131] = "latin",
+ -- [132] = "quenchua",
+ -- [133] = "guarani",
+ -- [134] = "aymara",
+ -- [135] = "tatar",
+ -- [136] = "uighur",
+ -- [137] = "dzongkha",
+ -- [138] = "javanese (roman script)",
+ -- [139] = "sundanese (roman script)",
+ -- [140] = "galician",
+ -- [141] = "afrikaans",
+ -- [142] = "breton",
+ -- [143] = "inuktitut",
+ -- [144] = "scottish gaelic",
+ -- [145] = "manx gaelic",
+ -- [146] = "irish gaelic (with dot above)",
+ -- [147] = "tongan",
+ -- [148] = "greek (polytonic)",
+ -- [149] = "greenlandic",
+ -- [150] = "azerbaijani (roman script)",
},
-- these can stay:
iso = {
},
-- english can stay:
windows = {
- [0x0436] = "afrikaans - south africa",
- [0x041c] = "albanian - albania",
- [0x0484] = "alsatian - france",
- [0x045e] = "amharic - ethiopia",
- [0x1401] = "arabic - algeria",
- [0x3c01] = "arabic - bahrain",
- [0x0c01] = "arabic - egypt",
- [0x0801] = "arabic - iraq",
- [0x2c01] = "arabic - jordan",
- [0x3401] = "arabic - kuwait",
- [0x3001] = "arabic - lebanon",
- [0x1001] = "arabic - libya",
- [0x1801] = "arabic - morocco",
- [0x2001] = "arabic - oman",
- [0x4001] = "arabic - qatar",
- [0x0401] = "arabic - saudi arabia",
- [0x2801] = "arabic - syria",
- [0x1c01] = "arabic - tunisia",
- [0x3801] = "arabic - u.a.e.",
- [0x2401] = "arabic - yemen",
- [0x042b] = "armenian - armenia",
- [0x044d] = "assamese - india",
- [0x082c] = "azeri (cyrillic) - azerbaijan",
- [0x042c] = "azeri (latin) - azerbaijan",
- [0x046d] = "bashkir - russia",
- [0x042d] = "basque - basque",
- [0x0423] = "belarusian - belarus",
- [0x0845] = "bengali - bangladesh",
- [0x0445] = "bengali - india",
- [0x201a] = "bosnian (cyrillic) - bosnia and herzegovina",
- [0x141a] = "bosnian (latin) - bosnia and herzegovina",
- [0x047e] = "breton - france",
- [0x0402] = "bulgarian - bulgaria",
- [0x0403] = "catalan - catalan",
- [0x0c04] = "chinese - hong kong s.a.r.",
- [0x1404] = "chinese - macao s.a.r.",
- [0x0804] = "chinese - people's republic of china",
- [0x1004] = "chinese - singapore",
- [0x0404] = "chinese - taiwan",
- [0x0483] = "corsican - france",
- [0x041a] = "croatian - croatia",
- [0x101a] = "croatian (latin) - bosnia and herzegovina",
- [0x0405] = "czech - czech republic",
- [0x0406] = "danish - denmark",
- [0x048c] = "dari - afghanistan",
- [0x0465] = "divehi - maldives",
- [0x0813] = "dutch - belgium",
- [0x0413] = "dutch - netherlands",
- [0x0c09] = "english - australia",
- [0x2809] = "english - belize",
- [0x1009] = "english - canada",
- [0x2409] = "english - caribbean",
- [0x4009] = "english - india",
- [0x1809] = "english - ireland",
- [0x2009] = "english - jamaica",
- [0x4409] = "english - malaysia",
- [0x1409] = "english - new zealand",
- [0x3409] = "english - republic of the philippines",
- [0x4809] = "english - singapore",
- [0x1c09] = "english - south africa",
- [0x2c09] = "english - trinidad and tobago",
- [0x0809] = "english - united kingdom",
+ -- [0x0436] = "afrikaans - south africa",
+ -- [0x041c] = "albanian - albania",
+ -- [0x0484] = "alsatian - france",
+ -- [0x045e] = "amharic - ethiopia",
+ -- [0x1401] = "arabic - algeria",
+ -- [0x3c01] = "arabic - bahrain",
+ -- [0x0c01] = "arabic - egypt",
+ -- [0x0801] = "arabic - iraq",
+ -- [0x2c01] = "arabic - jordan",
+ -- [0x3401] = "arabic - kuwait",
+ -- [0x3001] = "arabic - lebanon",
+ -- [0x1001] = "arabic - libya",
+ -- [0x1801] = "arabic - morocco",
+ -- [0x2001] = "arabic - oman",
+ -- [0x4001] = "arabic - qatar",
+ -- [0x0401] = "arabic - saudi arabia",
+ -- [0x2801] = "arabic - syria",
+ -- [0x1c01] = "arabic - tunisia",
+ -- [0x3801] = "arabic - u.a.e.",
+ -- [0x2401] = "arabic - yemen",
+ -- [0x042b] = "armenian - armenia",
+ -- [0x044d] = "assamese - india",
+ -- [0x082c] = "azeri (cyrillic) - azerbaijan",
+ -- [0x042c] = "azeri (latin) - azerbaijan",
+ -- [0x046d] = "bashkir - russia",
+ -- [0x042d] = "basque - basque",
+ -- [0x0423] = "belarusian - belarus",
+ -- [0x0845] = "bengali - bangladesh",
+ -- [0x0445] = "bengali - india",
+ -- [0x201a] = "bosnian (cyrillic) - bosnia and herzegovina",
+ -- [0x141a] = "bosnian (latin) - bosnia and herzegovina",
+ -- [0x047e] = "breton - france",
+ -- [0x0402] = "bulgarian - bulgaria",
+ -- [0x0403] = "catalan - catalan",
+ -- [0x0c04] = "chinese - hong kong s.a.r.",
+ -- [0x1404] = "chinese - macao s.a.r.",
+ -- [0x0804] = "chinese - people's republic of china",
+ -- [0x1004] = "chinese - singapore",
+ -- [0x0404] = "chinese - taiwan",
+ -- [0x0483] = "corsican - france",
+ -- [0x041a] = "croatian - croatia",
+ -- [0x101a] = "croatian (latin) - bosnia and herzegovina",
+ -- [0x0405] = "czech - czech republic",
+ -- [0x0406] = "danish - denmark",
+ -- [0x048c] = "dari - afghanistan",
+ -- [0x0465] = "divehi - maldives",
+ -- [0x0813] = "dutch - belgium",
+ -- [0x0413] = "dutch - netherlands",
+ -- [0x0c09] = "english - australia",
+ -- [0x2809] = "english - belize",
+ -- [0x1009] = "english - canada",
+ -- [0x2409] = "english - caribbean",
+ -- [0x4009] = "english - india",
+ -- [0x1809] = "english - ireland",
+ -- [0x2009] = "english - jamaica",
+ -- [0x4409] = "english - malaysia",
+ -- [0x1409] = "english - new zealand",
+ -- [0x3409] = "english - republic of the philippines",
+ -- [0x4809] = "english - singapore",
+ -- [0x1c09] = "english - south africa",
+ -- [0x2c09] = "english - trinidad and tobago",
+ -- [0x0809] = "english - united kingdom",
[0x0409] = "english - united states",
- [0x3009] = "english - zimbabwe",
- [0x0425] = "estonian - estonia",
- [0x0438] = "faroese - faroe islands",
- [0x0464] = "filipino - philippines",
- [0x040b] = "finnish - finland",
- [0x080c] = "french - belgium",
- [0x0c0c] = "french - canada",
- [0x040c] = "french - france",
- [0x140c] = "french - luxembourg",
- [0x180c] = "french - principality of monoco",
- [0x100c] = "french - switzerland",
- [0x0462] = "frisian - netherlands",
- [0x0456] = "galician - galician",
- [0x0437] = "georgian -georgia",
- [0x0c07] = "german - austria",
- [0x0407] = "german - germany",
- [0x1407] = "german - liechtenstein",
- [0x1007] = "german - luxembourg",
- [0x0807] = "german - switzerland",
- [0x0408] = "greek - greece",
- [0x046f] = "greenlandic - greenland",
- [0x0447] = "gujarati - india",
- [0x0468] = "hausa (latin) - nigeria",
- [0x040d] = "hebrew - israel",
- [0x0439] = "hindi - india",
- [0x040e] = "hungarian - hungary",
- [0x040f] = "icelandic - iceland",
- [0x0470] = "igbo - nigeria",
- [0x0421] = "indonesian - indonesia",
- [0x045d] = "inuktitut - canada",
- [0x085d] = "inuktitut (latin) - canada",
- [0x083c] = "irish - ireland",
- [0x0434] = "isixhosa - south africa",
- [0x0435] = "isizulu - south africa",
- [0x0410] = "italian - italy",
- [0x0810] = "italian - switzerland",
- [0x0411] = "japanese - japan",
- [0x044b] = "kannada - india",
- [0x043f] = "kazakh - kazakhstan",
- [0x0453] = "khmer - cambodia",
- [0x0486] = "k'iche - guatemala",
- [0x0487] = "kinyarwanda - rwanda",
- [0x0441] = "kiswahili - kenya",
- [0x0457] = "konkani - india",
- [0x0412] = "korean - korea",
- [0x0440] = "kyrgyz - kyrgyzstan",
- [0x0454] = "lao - lao p.d.r.",
- [0x0426] = "latvian - latvia",
- [0x0427] = "lithuanian - lithuania",
- [0x082e] = "lower sorbian - germany",
- [0x046e] = "luxembourgish - luxembourg",
- [0x042f] = "macedonian (fyrom) - former yugoslav republic of macedonia",
- [0x083e] = "malay - brunei darussalam",
- [0x043e] = "malay - malaysia",
- [0x044c] = "malayalam - india",
- [0x043a] = "maltese - malta",
- [0x0481] = "maori - new zealand",
- [0x047a] = "mapudungun - chile",
- [0x044e] = "marathi - india",
- [0x047c] = "mohawk - mohawk",
- [0x0450] = "mongolian (cyrillic) - mongolia",
- [0x0850] = "mongolian (traditional) - people's republic of china",
- [0x0461] = "nepali - nepal",
- [0x0414] = "norwegian (bokmal) - norway",
- [0x0814] = "norwegian (nynorsk) - norway",
- [0x0482] = "occitan - france",
- [0x0448] = "odia (formerly oriya) - india",
- [0x0463] = "pashto - afghanistan",
- [0x0415] = "polish - poland",
- [0x0416] = "portuguese - brazil",
- [0x0816] = "portuguese - portugal",
- [0x0446] = "punjabi - india",
- [0x046b] = "quechua - bolivia",
- [0x086b] = "quechua - ecuador",
- [0x0c6b] = "quechua - peru",
- [0x0418] = "romanian - romania",
- [0x0417] = "romansh - switzerland",
- [0x0419] = "russian - russia",
- [0x243b] = "sami (inari) - finland",
- [0x103b] = "sami (lule) - norway",
- [0x143b] = "sami (lule) - sweden",
- [0x0c3b] = "sami (northern) - finland",
- [0x043b] = "sami (northern) - norway",
- [0x083b] = "sami (northern) - sweden",
- [0x203b] = "sami (skolt) - finland",
- [0x183b] = "sami (southern) - norway",
- [0x1c3b] = "sami (southern) - sweden",
- [0x044f] = "sanskrit - india",
- [0x1c1a] = "serbian (cyrillic) - bosnia and herzegovina",
- [0x0c1a] = "serbian (cyrillic) - serbia",
- [0x181a] = "serbian (latin) - bosnia and herzegovina",
- [0x081a] = "serbian (latin) - serbia",
- [0x046c] = "sesotho sa leboa - south africa",
- [0x0432] = "setswana - south africa",
- [0x045b] = "sinhala - sri lanka",
- [0x041b] = "slovak - slovakia",
- [0x0424] = "slovenian - slovenia",
- [0x2c0a] = "spanish - argentina",
- [0x400a] = "spanish - bolivia",
- [0x340a] = "spanish - chile",
- [0x240a] = "spanish - colombia",
- [0x140a] = "spanish - costa rica",
- [0x1c0a] = "spanish - dominican republic",
- [0x300a] = "spanish - ecuador",
- [0x440a] = "spanish - el salvador",
- [0x100a] = "spanish - guatemala",
- [0x480a] = "spanish - honduras",
- [0x080a] = "spanish - mexico",
- [0x4c0a] = "spanish - nicaragua",
- [0x180a] = "spanish - panama",
- [0x3c0a] = "spanish - paraguay",
- [0x280a] = "spanish - peru",
- [0x500a] = "spanish - puerto rico",
- [0x0c0a] = "spanish (modern sort) - spain",
- [0x040a] = "spanish (traditional sort) - spain",
- [0x540a] = "spanish - united states",
- [0x380a] = "spanish - uruguay",
- [0x200a] = "spanish - venezuela",
- [0x081d] = "sweden - finland",
- [0x041d] = "swedish - sweden",
- [0x045a] = "syriac - syria",
- [0x0428] = "tajik (cyrillic) - tajikistan",
- [0x085f] = "tamazight (latin) - algeria",
- [0x0449] = "tamil - india",
- [0x0444] = "tatar - russia",
- [0x044a] = "telugu - india",
- [0x041e] = "thai - thailand",
- [0x0451] = "tibetan - prc",
- [0x041f] = "turkish - turkey",
- [0x0442] = "turkmen - turkmenistan",
- [0x0480] = "uighur - prc",
- [0x0422] = "ukrainian - ukraine",
- [0x042e] = "upper sorbian - germany",
- [0x0420] = "urdu - islamic republic of pakistan",
- [0x0843] = "uzbek (cyrillic) - uzbekistan",
- [0x0443] = "uzbek (latin) - uzbekistan",
- [0x042a] = "vietnamese - vietnam",
- [0x0452] = "welsh - united kingdom",
- [0x0488] = "wolof - senegal",
- [0x0485] = "yakut - russia",
- [0x0478] = "yi - prc",
- [0x046a] = "yoruba - nigeria",
+ -- [0x3009] = "english - zimbabwe",
+ -- [0x0425] = "estonian - estonia",
+ -- [0x0438] = "faroese - faroe islands",
+ -- [0x0464] = "filipino - philippines",
+ -- [0x040b] = "finnish - finland",
+ -- [0x080c] = "french - belgium",
+ -- [0x0c0c] = "french - canada",
+ -- [0x040c] = "french - france",
+ -- [0x140c] = "french - luxembourg",
+ -- [0x180c] = "french - principality of monoco",
+ -- [0x100c] = "french - switzerland",
+ -- [0x0462] = "frisian - netherlands",
+ -- [0x0456] = "galician - galician",
+ -- [0x0437] = "georgian -georgia",
+ -- [0x0c07] = "german - austria",
+ -- [0x0407] = "german - germany",
+ -- [0x1407] = "german - liechtenstein",
+ -- [0x1007] = "german - luxembourg",
+ -- [0x0807] = "german - switzerland",
+ -- [0x0408] = "greek - greece",
+ -- [0x046f] = "greenlandic - greenland",
+ -- [0x0447] = "gujarati - india",
+ -- [0x0468] = "hausa (latin) - nigeria",
+ -- [0x040d] = "hebrew - israel",
+ -- [0x0439] = "hindi - india",
+ -- [0x040e] = "hungarian - hungary",
+ -- [0x040f] = "icelandic - iceland",
+ -- [0x0470] = "igbo - nigeria",
+ -- [0x0421] = "indonesian - indonesia",
+ -- [0x045d] = "inuktitut - canada",
+ -- [0x085d] = "inuktitut (latin) - canada",
+ -- [0x083c] = "irish - ireland",
+ -- [0x0434] = "isixhosa - south africa",
+ -- [0x0435] = "isizulu - south africa",
+ -- [0x0410] = "italian - italy",
+ -- [0x0810] = "italian - switzerland",
+ -- [0x0411] = "japanese - japan",
+ -- [0x044b] = "kannada - india",
+ -- [0x043f] = "kazakh - kazakhstan",
+ -- [0x0453] = "khmer - cambodia",
+ -- [0x0486] = "k'iche - guatemala",
+ -- [0x0487] = "kinyarwanda - rwanda",
+ -- [0x0441] = "kiswahili - kenya",
+ -- [0x0457] = "konkani - india",
+ -- [0x0412] = "korean - korea",
+ -- [0x0440] = "kyrgyz - kyrgyzstan",
+ -- [0x0454] = "lao - lao p.d.r.",
+ -- [0x0426] = "latvian - latvia",
+ -- [0x0427] = "lithuanian - lithuania",
+ -- [0x082e] = "lower sorbian - germany",
+ -- [0x046e] = "luxembourgish - luxembourg",
+ -- [0x042f] = "macedonian (fyrom) - former yugoslav republic of macedonia",
+ -- [0x083e] = "malay - brunei darussalam",
+ -- [0x043e] = "malay - malaysia",
+ -- [0x044c] = "malayalam - india",
+ -- [0x043a] = "maltese - malta",
+ -- [0x0481] = "maori - new zealand",
+ -- [0x047a] = "mapudungun - chile",
+ -- [0x044e] = "marathi - india",
+ -- [0x047c] = "mohawk - mohawk",
+ -- [0x0450] = "mongolian (cyrillic) - mongolia",
+ -- [0x0850] = "mongolian (traditional) - people's republic of china",
+ -- [0x0461] = "nepali - nepal",
+ -- [0x0414] = "norwegian (bokmal) - norway",
+ -- [0x0814] = "norwegian (nynorsk) - norway",
+ -- [0x0482] = "occitan - france",
+ -- [0x0448] = "odia (formerly oriya) - india",
+ -- [0x0463] = "pashto - afghanistan",
+ -- [0x0415] = "polish - poland",
+ -- [0x0416] = "portuguese - brazil",
+ -- [0x0816] = "portuguese - portugal",
+ -- [0x0446] = "punjabi - india",
+ -- [0x046b] = "quechua - bolivia",
+ -- [0x086b] = "quechua - ecuador",
+ -- [0x0c6b] = "quechua - peru",
+ -- [0x0418] = "romanian - romania",
+ -- [0x0417] = "romansh - switzerland",
+ -- [0x0419] = "russian - russia",
+ -- [0x243b] = "sami (inari) - finland",
+ -- [0x103b] = "sami (lule) - norway",
+ -- [0x143b] = "sami (lule) - sweden",
+ -- [0x0c3b] = "sami (northern) - finland",
+ -- [0x043b] = "sami (northern) - norway",
+ -- [0x083b] = "sami (northern) - sweden",
+ -- [0x203b] = "sami (skolt) - finland",
+ -- [0x183b] = "sami (southern) - norway",
+ -- [0x1c3b] = "sami (southern) - sweden",
+ -- [0x044f] = "sanskrit - india",
+ -- [0x1c1a] = "serbian (cyrillic) - bosnia and herzegovina",
+ -- [0x0c1a] = "serbian (cyrillic) - serbia",
+ -- [0x181a] = "serbian (latin) - bosnia and herzegovina",
+ -- [0x081a] = "serbian (latin) - serbia",
+ -- [0x046c] = "sesotho sa leboa - south africa",
+ -- [0x0432] = "setswana - south africa",
+ -- [0x045b] = "sinhala - sri lanka",
+ -- [0x041b] = "slovak - slovakia",
+ -- [0x0424] = "slovenian - slovenia",
+ -- [0x2c0a] = "spanish - argentina",
+ -- [0x400a] = "spanish - bolivia",
+ -- [0x340a] = "spanish - chile",
+ -- [0x240a] = "spanish - colombia",
+ -- [0x140a] = "spanish - costa rica",
+ -- [0x1c0a] = "spanish - dominican republic",
+ -- [0x300a] = "spanish - ecuador",
+ -- [0x440a] = "spanish - el salvador",
+ -- [0x100a] = "spanish - guatemala",
+ -- [0x480a] = "spanish - honduras",
+ -- [0x080a] = "spanish - mexico",
+ -- [0x4c0a] = "spanish - nicaragua",
+ -- [0x180a] = "spanish - panama",
+ -- [0x3c0a] = "spanish - paraguay",
+ -- [0x280a] = "spanish - peru",
+ -- [0x500a] = "spanish - puerto rico",
+ -- [0x0c0a] = "spanish (modern sort) - spain",
+ -- [0x040a] = "spanish (traditional sort) - spain",
+ -- [0x540a] = "spanish - united states",
+ -- [0x380a] = "spanish - uruguay",
+ -- [0x200a] = "spanish - venezuela",
+ -- [0x081d] = "sweden - finland",
+ -- [0x041d] = "swedish - sweden",
+ -- [0x045a] = "syriac - syria",
+ -- [0x0428] = "tajik (cyrillic) - tajikistan",
+ -- [0x085f] = "tamazight (latin) - algeria",
+ -- [0x0449] = "tamil - india",
+ -- [0x0444] = "tatar - russia",
+ -- [0x044a] = "telugu - india",
+ -- [0x041e] = "thai - thailand",
+ -- [0x0451] = "tibetan - prc",
+ -- [0x041f] = "turkish - turkey",
+ -- [0x0442] = "turkmen - turkmenistan",
+ -- [0x0480] = "uighur - prc",
+ -- [0x0422] = "ukrainian - ukraine",
+ -- [0x042e] = "upper sorbian - germany",
+ -- [0x0420] = "urdu - islamic republic of pakistan",
+ -- [0x0843] = "uzbek (cyrillic) - uzbekistan",
+ -- [0x0443] = "uzbek (latin) - uzbekistan",
+ -- [0x042a] = "vietnamese - vietnam",
+ -- [0x0452] = "welsh - united kingdom",
+ -- [0x0488] = "wolof - senegal",
+ -- [0x0485] = "yakut - russia",
+ -- [0x0478] = "yi - prc",
+ -- [0x046a] = "yoruba - nigeria",
},
custom = {
},
@@ -1129,6 +1129,7 @@ formatreaders[4] = function(f,fontdata,offset)
local indices = { }
local mapping = fontdata.mapping
local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
--
for i=1,nofsegments do
endchars[i] = readushort(f)
@@ -1162,10 +1163,15 @@ formatreaders[4] = function(f,fontdata,offset)
if index and index > 0 then
local glyph = glyphs[index]
if glyph then
- if not glyph.unicode then
+ local gu = glyph.unicode
+ if not gu then
glyph.unicode = unicode
+ else
+ -- no duplicates ... weird side effects in lm
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
end
- mapping[index] = unicode
-- report("case 1: %C %04i %s",unicode,index,glyphs[index].name)
end
end
@@ -1179,10 +1185,15 @@ formatreaders[4] = function(f,fontdata,offset)
index = mod(index + delta,65536)
local glyph = glyphs[index]
if glyph then
- if not glyph.unicode then
+ local gu = glyph.unicode
+ if not gu then
glyph.unicode = unicode
+ else
+ -- no duplicates ... weird side effects in lm
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
end
- mapping[index] = unicode
-- report("case 2: %C %04i %s",unicode,index,glyphs[index].name)
end
end
@@ -1194,37 +1205,59 @@ end
formatreaders[6] = function(f,fontdata,offset)
setposition(f,offset+2+2+2) -- skip format length language
- local mapping = fontdata.mapping
- local glyphs = fontdata.glyphs
- local start = readushort(f)
- local count = readushort(f)
+ local mapping = fontdata.mapping
+ local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
+ local start = readushort(f)
+ local count = readushort(f)
for unicode=start,start+count-1 do
local index = readushort(f)
if index > 0 then
local glyph = glyphs[index]
- if not glyph.unicode then
- glyph.unicode = unicode
+ if glyph then
+ local gu = glyph.unicode
+ if not gu then
+ glyph.unicode = unicode
+ else
+ -- no duplicates ... weird side effects in lm
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
+ end
end
- mapping[index] = unicode
end
end
end
formatreaders[12] = function(f,fontdata,offset)
setposition(f,offset+2+2+4+4) -- skip format reserved length language
- local mapping = fontdata.mapping
- local glyphs = fontdata.glyphs
- local nofgroups = readulong(f)
+ local mapping = fontdata.mapping
+ local glyphs = fontdata.glyphs
+ local duplicates = fontdata.duplicates
+ local nofgroups = readulong(f)
for i=1,nofgroups do
local first = readulong(f)
local last = readulong(f)
local index = readulong(f)
for unicode=first,last do
local glyph = glyphs[index]
- if not glyph.unicode then
- glyph.unicode = unicode
+ if glyph then
+ local gu = glyph.unicode
+ if not gu then
+ glyph.unicode = unicode
+ elseif gu ~= unicode then
+ -- e.g. sourcehan fonts need this
+ local d = duplicates[gu]
+ if d then
+ d[unicode] = true
+ else
+ duplicates[gu] = { [unicode] = true }
+ end
+ end
+ if not mapping[index] then
+ mapping[index] = unicode
+ end
end
- mapping[index] = unicode
index = index + 1
end
end
@@ -1307,12 +1340,14 @@ function readers.cmap(f,fontdata,specification)
if datatable then
local tableoffset = datatable.offset
setposition(f,tableoffset)
- local version = readushort(f)
- local noftables = readushort(f)
- local records = { }
- local unicodecid = false
- local variantcid = false
- local variants = { }
+ local version = readushort(f)
+ local noftables = readushort(f)
+ local records = { }
+ local unicodecid = false
+ local variantcid = false
+ local variants = { }
+ local duplicates = fontdata.duplicates or { }
+ fontdata.duplicates = duplicates
for i=1,noftables do
local platform = readushort(f)
local encoding = readushort(f)
@@ -1371,7 +1406,7 @@ function readers.cmap(f,fontdata,specification)
table.sort(list)
report("no unicode cmap record loaded, found tables: % t",list)
end
- checkcmap(f,fontdata,records,0, 5,14) -- variants
+ checkcmap(f,fontdata,records,0,5,14) -- variants
--
fontdata.cidmaps = {
version = version,
@@ -1901,7 +1936,7 @@ function readers.loadfont(filename,n)
resources = {
filename = fontdata.filename,
private = privateoffset,
- duplicates = { }, -- todo
+ duplicates = fontdata.duplicates or { },
features = fontdata.features or { }, -- we need to add these in the loader
sublookups = fontdata.sublookups or { }, -- we need to add these in the loader
marks = fontdata.marks or { }, -- we need to add these in the loader
diff --git a/tex/context/base/font-oup.lua b/tex/context/base/font-oup.lua
index 534bfe42e..c740b5e55 100644
--- a/tex/context/base/font-oup.lua
+++ b/tex/context/base/font-oup.lua
@@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['font-oup'] = {
local next, type = next, type
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local lpegmatch = lpeg.match
-local insert, remove = table.insert, table.remove
+local insert, remove, copy = table.insert, table.remove, table.copy
local formatters = string.formatters
local sortedkeys = table.sortedkeys
@@ -23,9 +23,12 @@ local trace_markwidth = false trackers.register("otf.markwidth",function(v) t
local readers = fonts.handlers.otf.readers
local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
-local f_private = formatters["P%05X"]
-local f_unicode = formatters["U%05X"]
-local f_index = formatters["I%05X"]
+local f_private = formatters["P%05X"]
+local f_unicode = formatters["U%05X"]
+local f_index = formatters["I%05X"]
+local f_character = formatters["%C"]
+
+local doduplicates = true -- can become an option (pseudo feature)
local function replaced(list,index,replacement)
if type(list) == "number" then
@@ -102,6 +105,11 @@ local function unifyresources(fontdata,indices)
--
local done = { } -- we need to deal with shared !
--
+ local duplicates = doduplicates and resources.duplicates
+ if duplicates and not next(duplicates) then
+ duplicates = false
+ end
+ --
local function recover(cover) -- can be packed
for i=1,#cover do
local c = cover[i]
@@ -128,6 +136,9 @@ local function unifyresources(fontdata,indices)
return t
end
--
+ -- the duplicates need checking (probably only in cjk fonts): currently we only check
+ -- gsub_single, gsub_alternate and gsub_multiple
+ --
local function unifythem(sequences)
if not sequences then
return
@@ -146,8 +157,23 @@ local function unifyresources(fontdata,indices)
local t1 = done[c]
if not t1 then
t1 = { }
- for g1, d1 in next, c do
- t1[indices[g1]] = indices[d1]
+ if duplicates then
+ for g1, d1 in next, c do
+ local ug1 = indices[g1]
+ local ud1 = indices[d1]
+ t1[ug1] = ud1
+ --
+ local dg1 = duplicates[ug1]
+ if dg1 then
+ for u in next, dg1 do
+ t1[u] = ud1
+ end
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ t1[indices[g1]] = indices[d1]
+ end
end
done[c] = t1
end
@@ -185,11 +211,28 @@ local function unifyresources(fontdata,indices)
local t1 = done[c]
if not t1 then
t1 = { }
- for g1, d1 in next, c do
- for i=1,#d1 do
- d1[i] = indices[d1[i]]
+ if duplicates then
+ for g1, d1 in next, c do
+ for i=1,#d1 do
+ d1[i] = indices[d1[i]]
+ end
+ local ug1 = indices[g1]
+ t1[ug1] = d1
+ --
+ local dg1 = duplicates[ug1]
+ if dg1 then
+ for u in next, dg1 do
+ t1[u] = copy(d1)
+ end
+ end
+ end
+ else
+ for g1, d1 in next, c do
+ for i=1,#d1 do
+ d1[i] = indices[d1[i]]
+ end
+ t1[indices[g1]] = d1
end
- t1[indices[g1]] = d1
end
done[c] = t1
end
@@ -272,6 +315,25 @@ local function unifyresources(fontdata,indices)
unifythem(resources.sublookups)
end
+local function copyduplicates(fontdata)
+ if doduplicates then
+ local descriptions = fontdata.descriptions
+ local resources = fontdata.resources
+ local duplicates = resources.duplicates
+ if duplicates then
+ for u, d in next, duplicates do
+ local du = descriptions[u]
+ local t = { f_character(u) }
+ for u in next, d do
+ descriptions[u] = copy(du)
+ t[#t+1] = f_character(u)
+ end
+ report("duplicates: % t",t)
+ end
+ end
+ end
+end
+
local ignore = { -- should we fix them?
["notdef"] = true,
[".notdef"] = true,
@@ -618,12 +680,14 @@ function readers.rehash(fontdata,hashmethod) -- TODO: combine loops in one
fontdata.hashmethod = "names"
local indices = unifyglyphs(fontdata,true)
unifyresources(fontdata,indices)
+ copyduplicates(fontdata)
unifymissing(fontdata)
-- stripredundant(fontdata)
else
fontdata.hashmethod = "unicode"
local indices = unifyglyphs(fontdata)
unifyresources(fontdata,indices)
+ copyduplicates(fontdata)
unifymissing(fontdata)
stripredundant(fontdata)
end
@@ -635,6 +699,7 @@ function readers.checkhash(fontdata)
fontdata.names = nil -- just to be sure
elseif hashmethod == "names" and fontdata.names then
unifyresources(fontdata,fontdata.names)
+ copyduplicates(fontdata)
fontdata.hashmethod = "unicode"
fontdata.names = nil -- no need for it
else
diff --git a/tex/context/base/luat-fmt.lua b/tex/context/base/luat-fmt.lua
index 92c1dd6c4..9a86ef50e 100644
--- a/tex/context/base/luat-fmt.lua
+++ b/tex/context/base/luat-fmt.lua
@@ -29,7 +29,10 @@ local function primaryflags() -- not yet ok
return concat(flags," ")
end
-function environment.make_format(name)
+-- The silent option is Taco. It's a bit of a hack because we cannot yet mess
+-- with directives. In fact, I could probably clean up the maker a bit by now.
+
+function environment.make_format(name,silent)
local engine = environment.ownmain or "luatex"
-- change to format path (early as we need expanded paths)
local olddir = dir.current()
@@ -93,9 +96,23 @@ function environment.make_format(name)
return
end
-- generate format
- local command = format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\")
- report_format("running command: %s\n",command)
- os.execute(command)
+ local dump = os.platform=="unix" and "\\\\dump" or "\\dump"
+ if silent then
+ statistics.starttiming()
+ local command = format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ local result = os.execute(command)
+ local runtime = statistics.stoptiming()
+ if result ~= 0 then
+ print(format("%s silent make > fatal error when making format %q",engine,name)) -- we use a basic print
+ else
+ print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime)) -- we use a basic print
+ end
+ os.remove("temp.log")
+ else
+ local command = format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump)
+ report_format("running command: %s\n",command)
+ os.execute(command)
+ end
-- remove related mem files
local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem"
-- report_format("removing related mplib format with pattern %a", pattern)
diff --git a/tex/context/base/m-oldotf.mkiv b/tex/context/base/m-oldotf.mkiv
new file mode 100644
index 000000000..04a83a47b
--- /dev/null
+++ b/tex/context/base/m-oldotf.mkiv
@@ -0,0 +1,83 @@
+%D \module
+%D [ file=m-oldotf,
+%D version=2015.07.08,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Traditional OTF Loader,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% \endinput
+
+%D This module will go away as soon as we use the new loader code by default.
+%D That will happen after extensive testing. Generic support will happen after
+%D that.
+
+\unprotect
+
+\startluacode
+ local files = {
+ "font-otf",
+ "font-otb",
+ "font-inj",
+ "font-ota",
+ "font-otn",
+ "font-otd",
+ "font-otp",
+ "font-otc",
+ "font-oth",
+ "font-odv",
+ "font-map",
+ "font-fbk",
+ "font-gds",
+ }
+ local report = logs.reporter("oldotf")
+ local findfile = resolvers.findfile
+ local addsuffix = file.addsuffix
+ report()
+ report("using traditional font loader code")
+ report()
+ for i=1,#files do
+ local foundfile = findfile(addsuffix(files[i],"lua"))
+ if foundfile and foundfile ~= "" then
+ report("loading %a",foundfile)
+ dofile(foundfile)
+ end
+ end
+ report()
+
+ -- needed for testing:
+
+ local nuts = nodes.nuts
+ local copy_node = nuts.copy
+ local kern = nuts.pool.register(nuts.pool.kern())
+ local setfield = nuts.setfield
+
+ nuts.setattr(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared
+
+ nodes.injections.installnewkern(function(k)
+ local c = copy_node(kern)
+ setfield(c,"kern",k)
+ return c
+ end)
+
+ directives.register("nodes.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end)
+
+ local fonts = fonts
+ local handlers = fonts.handlers
+ local otf = handlers.otf -- brrr
+ local afm = handlers.afm -- brrr
+ local getters = fonts.getters
+
+ getters.kern .opentype = otf.getkern
+ getters.substitution.opentype = otf.getsubstitution
+ getters.alternate .opentype = otf.getalternate
+ getters.multiple .opentype = otf.getmultiple
+
+\stopluacode
+
+\protect \endinput
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 79d581f27..2609ba4d4 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index efb631bc8..d7249ac2d 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 2fd824467..ddbfffb17 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 10/04/15 19:25:05
+-- merge date : 10/06/15 12:49:17
do -- begin closure to overcome local limits and interference