texlive[44236] trunk: context (May 7 00:36)

commits+karl at tug.org commits+karl at tug.org
Sun May 7 23:21:52 CEST 2017


Revision: 44236
          http://tug.org/svn/texlive?view=revision&revision=44236
Author:   karl
Date:     2017-05-07 23:21:52 +0200 (Sun, 07 May 2017)
Log Message:
-----------
context (May  7 00:36)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl
    trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
    trunk/Master/texmf-dist/doc/context/presentations/bachotex/2016/bachotex-2016-toolbox.tex
    trunk/Master/texmf-dist/doc/man/man1/context.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
    trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
    trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii
    trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
    trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
    trunk/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
    trunk/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
    trunk/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv
    trunk/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
    trunk/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
    trunk/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
    trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-koeielettersot.mkiv
    trunk/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
    trunk/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
    trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua
    trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
    trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
    trunk/Master/tlpkg/libexec/ctan2tds

Modified: trunk/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl	2017-05-07 21:21:52 UTC (rev 44236)
@@ -2,7 +2,7 @@
 #
 # kanji-fontmap-creator
 # (c) 2012-2014 Norbert Preining
-# Version: 20170114.0
+# Version: 20170505.0
 # Licenced under the GPLv2 or any higher version
 #
 # gui to create map files for updmap(-setup-kanji)
@@ -41,7 +41,7 @@
 my $opt_version = 0;
 
 my $prg = "kanji-fontmap-creator";
-my $version = "20170114.0";
+my $version = "20170505.0";
 
 #
 # global vars configuring operation

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2017-05-07 21:21:52 UTC (rev 44236)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# $Id: tlmgr.pl 44189 2017-05-04 17:31:52Z karl $
+# $Id: tlmgr.pl 44201 2017-05-05 15:33:32Z karl $
 #
 # Copyright 2008-2017 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
@@ -6,8 +6,8 @@
 # or any later version.
 #
 
-my $svnrev = '$Revision: 44189 $';
-my $datrev = '$Date: 2017-05-04 19:31:52 +0200 (Thu, 04 May 2017) $';
+my $svnrev = '$Revision: 44201 $';
+my $datrev = '$Date: 2017-05-05 17:33:32 +0200 (Fri, 05 May 2017) $';
 my $tlmgrrevision;
 my $prg;
 if ($svnrev =~ m/: ([0-9]+) /) {
@@ -8809,7 +8809,7 @@
 distribution (L<http://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id$
+$Id: tlmgr.pl 44201 2017-05-05 15:33:32Z karl $
 =cut
 
 # to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-cs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-ro.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/presentations/bachotex/2016/bachotex-2016-toolbox.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/bachotex/2016/bachotex-2016-toolbox.tex	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/doc/context/presentations/bachotex/2016/bachotex-2016-toolbox.tex	2017-05-07 21:21:52 UTC (rev 44236)
@@ -143,7 +143,7 @@
 
 \startsection[title={history cycles}]
     \startitemize
-    \startitem there id this historic cycle (reinvent the wheel) \stopitem
+    \startitem there is this historic cycle (reinvent the wheel) \stopitem
     \startitem for instance we currently see a revival of vinyl \stopitem
     \startitem is this a side effect of crappy mp3 and/or poor digital equipment? \stopitem
     \startitem does it mean that eventually paper books will florish again too? \stopitem

Modified: trunk/Master/texmf-dist/doc/man/man1/context.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-dvi.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-unicode.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkii/cont-new.mkii	2017-05-07 21:21:52 UTC (rev 44236)
@@ -11,7 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\newcontextversion{2017.04.27 01:00}
+\newcontextversion{2017.05.06 23:06}
 
 %D This file is loaded at runtime, thereby providing an
 %D excellent place for hacks, patches, extensions and new

Modified: trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkii/context.mkii	2017-05-07 21:21:52 UTC (rev 44236)
@@ -20,7 +20,7 @@
 %D your styles an modules.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2017.04.27 01:00}
+\edef\contextversion{2017.05.06 23:06}
 
 %D For those who want to use this:
 

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/char-ini.lua	2017-05-07 21:21:52 UTC (rev 44236)
@@ -1496,8 +1496,8 @@
 
     local p_special = p_family + p_couple + p_kiss
 
---     print(lpeg.match(p_special,"family man woman girl"))
---      print(lpeg.match(p_special,"family man dark skin tone woman girl girl"))
+ -- print(lpeg.match(p_special,"family man woman girl"))
+ -- print(lpeg.match(p_special,"family man dark skin tone woman girl girl"))
 
  -- local p_special = P { "all",
  --     all    = Cs (V("family") + V("couple") + V("kiss")),
@@ -1509,11 +1509,11 @@
  --     rest   = (space * skin)^0/"" * ((space^1/zwj) + P(-1)),
  -- }
 
-    -- maybe characters.emoji.toutf
-
     local emoji      = { }
     characters.emoji = emoji
 
+local cache = setmetatable({ }, { __mode = "k" } )
+
     function emoji.resolve(name)
         if not hash then
             data, hash = load()
@@ -1522,11 +1522,18 @@
         if h then
             return h
         end
+local h = cache[name]
+if h then
+    return h
+elseif h == false then
+    return
+end
         -- expand shortcuts
         local name = lpegmatch(pattern_0,name) or name
         -- expand some 25K variants
         local h = lpegmatch(p_special,name)
         if h then
+cache[name] = h
             return h
         end
         -- simplify
@@ -1533,6 +1540,7 @@
         local s = lpegmatch(pattern_1,name)
         local h = hash[s]
         if h then
+cache[name] = h
             return h
         end
         -- simplify
@@ -1539,8 +1547,10 @@
         local s = lpegmatch(pattern_2,name)
         local h = hash[s]
         if h then
+cache[name] = h
             return h
         end
+cache[name] = false
     end
 
     function emoji.known()

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/cont-new.mkiv	2017-05-07 21:21:52 UTC (rev 44236)
@@ -11,7 +11,7 @@
 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
 %C details.
 
-\newcontextversion{2017.04.27 01:00}
+\newcontextversion{2017.05.06 23:06}
 
 %D This file is loaded at runtime, thereby providing an excellent place for
 %D hacks, patches, extensions and new features.

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/context.mkiv	2017-05-07 21:21:52 UTC (rev 44236)
@@ -39,7 +39,7 @@
 %D up and the dependencies are more consistent.
 
 \edef\contextformat {\jobname}
-\edef\contextversion{2017.04.27 01:00}
+\edef\contextversion{2017.05.06 23:06}
 \edef\contextkind   {beta}
 
 %D For those who want to use this:

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-lib.mkvi	2017-05-07 21:21:52 UTC (rev 44236)
@@ -87,7 +87,6 @@
 \registerctxluafile{font-vf} {1.001}
 \registerctxluafile{font-enh}{1.001}
 
-%registerctxluafile{font-gds}{1.001}
 \registerctxluafile{good-ini}{1.001}
 \registerctxluafile{good-gen}{1.001}
 \registerctxluafile{good-ctx}{1.001}

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-ocl.lua	2017-05-07 21:21:52 UTC (rev 44236)
@@ -11,6 +11,7 @@
 local tostring, next, format = tostring, next, string.format
 local round, max = math.round, math.round
 local sortedkeys, sortedhash = table.sortedkeys, table.sortedhash
+local setmetatableindex = table.setmetatableindex
 
 local formatters = string.formatters
 local tounicode  = fonts.mappings.tounicode
@@ -47,7 +48,7 @@
 
 local sharedpalettes = { }
 
-local hash = table.setmetatableindex(function(t,k)
+local hash = setmetatableindex(function(t,k)
     local v = { "special", k }
     t[k] = v
     return v
@@ -130,7 +131,7 @@
             --
             local converted = resources.converted
             if not converted then
-                converted = table.setmetatableindex(convert)
+                converted = setmetatableindex(convert)
                 resources.converted = converted
             end
             local colorvalues = sharedpalettes[value] or converted[palettes[tonumber(value) or 1] or palettes[1]] or { }
@@ -147,7 +148,7 @@
             tfmdata.fonts = {
                 { id = 0 }
             }
-            local widths = table.setmetatableindex(function(t,k)
+            local widths = setmetatableindex(function(t,k)
                 local v = { "right", -k }
                 t[k] = v
                 return v
@@ -155,24 +156,32 @@
             --
             local getactualtext = otf.getactualtext
             local default       = colorvalues[#colorvalues]
-            local endactual     = nil
+            local b, e          = getactualtext(tounicode(0xFFFD))
             local start         = { "special", "pdf:page:q" }
             local stop          = { "special", "pdf:raw:Q" }
+            local actualb       = { "special", "pdf:page:" .. b } -- saves tables
+            local actuale       = { "special", "pdf:page:" .. e } -- saves tables
             --
+            local cache = setmetatableindex(function(t,k)
+                local v = { "char", k }
+                t[k] = v
+                return v
+            end)
+            --
             for unicode, character in next, characters do
                 local description = descriptions[unicode]
                 if description then
                     local colorlist = description.colors
                     if colorlist then
-                        local b, e = getactualtext(tounicode(characters[unicode].unicode or 0xFFFD))
+                        local u = description.unicode or characters[unicode].unicode
                         local w = character.width or 0
                         local s = #colorlist
-                        local goback = w ~= 0 and widths[w] or nil
+                        local goback = w ~= 0 and widths[w] or nil -- needs checking: are widths the same
                         local t = {
                             start,
-                            { "special", "pdf:raw:" .. b }
+                            not u and actualb or { "special", "pdf:raw:" .. getactualtext(tounicode(u)) }
                         }
-                        local n = #t
+                        local n = 2
                         local l = nil
                         for i=1,s do
                             local entry = colorlist[i]
@@ -181,15 +190,12 @@
                                 n = n + 1 t[n] = v
                                 l = v
                             end
-                            n = n + 1 t[n] = { "char", entry.slot }
+                            n = n + 1 t[n] = cache[entry.slot]
                             if s > 1 and i < s and goback then
                                 n = n + 1 t[n] = goback
                             end
                         end
-                        if not endactual then
-                            endactual = { "special", "pdf:page:" .. e } -- saves tables
-                        end
-                        n = n + 1 t[n] = endactual
+                        n = n + 1 t[n] = actuale
                         n = n + 1 t[n] = stop
                         character.commands = t
                     end

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-otr.lua	2017-05-07 21:21:52 UTC (rev 44236)
@@ -2039,7 +2039,7 @@
     end
 end
 
-local variablefonts_supported = context and true or false
+local variablefonts_supported = (context and true) or (logs and logs.application and true) or false
 
 local function readdata(f,offset,specification)
 
@@ -2100,6 +2100,8 @@
                 else
                     report("user instance: %s, bad factors",instance)
                 end
+            else
+                report("unknown instance")
             end
         end
 

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/font-ttf.lua	2017-05-07 21:21:52 UTC (rev 44236)
@@ -555,7 +555,7 @@
                 -- we merged them
             else
                 local contours    = shape.contours
-                local nofcontours = #contours
+                local nofcontours = contours and #contours or 0
                 local boundingbox = glyph.boundingbox or noboundingbox
                 r = r + 1 result[r] = toshort(nofcontours)
                 r = r + 1 result[r] = toshort(boundingbox[1]) -- xmin
@@ -696,7 +696,7 @@
         else
             x = x + readshort(f)
         end
-        points[i] = { x, y, bittest(flag,0x01) }
+        points[i] = { x, 0, bittest(flag,0x01) }
     end
     local y = 0
     for i=1,nofpoints do
@@ -924,6 +924,9 @@
     return record
 end
 
+-- (1) the first is a real point the rest deltas
+-- (2) points can be present more than once (multiple deltas then)
+
 local function readpoints(f)
     local count = readbyte(f)
     if count == 0 then
@@ -937,7 +940,7 @@
         end
         local points = { }
         local p = 0
-        local n = 1
+        local n = 1 -- indices
         while p < count do
             local control   = readbyte(f)
             local runreader = bittest(control,0x80) and readushort or readbyte
@@ -955,22 +958,24 @@
 local function readdeltas(f,nofpoints)
     local deltas = { }
     local p = 0
-    local n = 0
-    local z = false
+    local z = 0
     while nofpoints > 0 do
         local control   = readbyte(f)
+if not control then
+    break
+end
         local allzero   = bittest(control,0x80)
-        local runreader = bittest(control,0x40) and readshort or readinteger
         local runlength = band(control,0x3F) + 1
         if allzero then
-            z = runlength
+            z = z + runlength
         else
-            if z then
+            local runreader = bittest(control,0x40) and readshort or readinteger
+            if z > 0 then
                 for i=1,z do
                     p = p + 1
                     deltas[p] = 0
                 end
-                z = false
+                z = 0
             end
             for i=1,runlength do
                 p = p + 1
@@ -980,12 +985,12 @@
         nofpoints = nofpoints - runlength
     end
     -- saves space
- -- if z then
- --     for i=1,z do
- --         p = p + 1
- --         deltas[p] = 0
- --     end
- -- end
+-- if z > 0 then
+--     for i=1,z do
+--         p = p + 1
+--         deltas[p] = 0
+--     end
+-- end
     if p > 0 then
         -- forget about trailing zeros
         return deltas
@@ -994,7 +999,42 @@
     end
 end
 
+local function readdeltas(f,nofpoints)
+    local deltas = { }
+    local p = 0
+    while nofpoints > 0 do
+        local control = readbyte(f)
+        if control then
+            local allzero   = bittest(control,0x80)
+            local runlength = band(control,0x3F) + 1
+            if allzero then
+                for i=1,runlength do
+                    p = p + 1
+                    deltas[p] = 0
+                end
+            else
+                local runreader = bittest(control,0x40) and readshort or readinteger
+                for i=1,runlength do
+                    p = p + 1
+                    deltas[p] = runreader(f)
+                end
+            end
+            nofpoints = nofpoints - runlength
+        else
+            -- it happens
+            break
+        end
+    end
+    -- saves space
+    if p > 0 then
+        return deltas
+    else
+        -- forget about all zeros
+    end
+end
+
 function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
+    -- this is one of the messiest tables
     local instance = specification.instance
     if not instance then
         return
@@ -1008,7 +1048,7 @@
         local version     = readulong(f) -- 1.0
         local nofaxis     = readushort(f)
         local noftuples   = readushort(f)
-        local tupleoffset = readulong(f)  -- shared
+        local tupleoffset = tableoffset + readulong(f)
         local nofglyphs   = readushort(f)
         local flags       = readushort(f)
         local dataoffset  = tableoffset + readulong(f)
@@ -1027,61 +1067,58 @@
             end
         end
         --
-        setposition(f,tableoffset+tupleoffset)
-        for i=1,noftuples do
-            tuples[i] = readtuplerecord(f,nofaxis) -- used ?
+        if noftuples > 0 then
+            setposition(f,tupleoffset)
+            for i=1,noftuples do
+                tuples[i] = readtuplerecord(f,nofaxis)
+            end
         end
         local lastoffset = false
         for i=1,nofglyphs do -- hm one more cf spec
-            local shape = shapedata[i-1] -- todo 0
-            if shape then
-                local startoffset = dataoffset + data[i]
-                if startoffset == lastoffset then
-                    -- in the font that i used for testing there were the same offsets so
-                    -- we can assume that this indicates a zero entry
+            local startoffset = dataoffset + data[i]
+            if startoffset == lastoffset then
+                -- no deltas
+            else
+                local shape = shapedata[i-1] -- todo 0
+                if not shape then
+                    -- no shape
                 else
-                    -- todo: args_are_xy_values mess .. i have to be really bored
-                    -- and motivated to deal with it
-
                     lastoffset = startoffset
                     setposition(f,startoffset)
                     local flags     = readushort(f)
                     local count     = band(flags,0x0FFF)
-                    local points    = bittest(flags,0x8000)
                     local offset    = startoffset + readushort(f) -- to serialized
                     local deltas    = { }
-                    local nofpoints = 0
-                    local allpoints = (shape.nofpoints or 0) + 1
-                    if points then
+                    local allpoints = (shape.nofpoints or 0) -- + 1
+                    local shared    = false
+                    local nofshared = 0
+                    if bittest(flags,0x8000) then -- has shared points
                         -- go to the packed stream (get them once)
                         local current = getposition(f)
                         setposition(f,offset)
-                        points, nofpoints = readpoints(f)
+                        shared, nofshared = readpoints(f)
                         offset = getposition(f)
                         setposition(f,current)
                         -- and back to the table
-                    else
-                        points, nofpoints = nil, 0
                     end
-                    for i=1,count do
-                        local currentstart = getposition(f)
+                    for j=1,count do
                         local size         = readushort(f) -- check
                         local flags        = readushort(f)
                         local index        = band(flags,0x0FFF)
                         local haspeak      = bittest(flags,0x8000)
                         local intermediate = bittest(flags,0x4000)
-                        local private      = bittest(flags,0x1000)
+                        local private      = bittest(flags,0x2000)
                         local peak         = nil
                         local start        = nil
                         local stop         = nil
                         local xvalues      = nil
                         local yvalues      = nil
-                        local points       = points    -- we default to shared
-                        local nofpoints    = nofpoints -- we default to shared
-                        local advance      = 4
-                        if peak then
+                        local points       = shared    -- we default to shared
+                        local nofpoints    = nofshared -- we default to shared
+                     -- local advance      = 4
+                        if haspeak then
                             peak    = readtuplerecord(f,nofaxis)
-                            advance = advance + 2*nofaxis
+                         -- advance = advance + 2*nofaxis
                         else
                             if index+1 > #tuples then
                                 print("error, bad index",index)
@@ -1088,28 +1125,31 @@
                             end
                             peak = tuples[index+1] -- hm, needs checking, only peak?
                         end
--- what start otherwise ?
                         if intermediate then
                             start   = readtuplerecord(f,nofaxis)
                             stop    = readtuplerecord(f,nofaxis)
-                            advance = advance + 4*nofaxis
+                         -- advance = advance + 4*nofaxis
                         end
                         -- get the deltas
                         if size > 0 then
+                            local current = getposition(f)
                             -- goto the packed stream
                             setposition(f,offset)
                             if private then
                                 points, nofpoints = readpoints(f)
-                            elseif nofpoints == 0 then
-                                nofpoints = allpoints
+                            end -- else
+                            if nofpoints == 0 then
+                                nofpoints = allpoints + 4
                             end
                             if nofpoints > 0 then
+                                -- a nice test is to do only one
                                 xvalues = readdeltas(f,nofpoints)
                                 yvalues = readdeltas(f,nofpoints)
                             end
-                            offset = getposition(f)
+                            -- resync offset
+                            offset = offset + size
                             -- back to the table
-                            setposition(f,currentstart+advance)
+                            setposition(f,current)
                         end
                         if not xvalues and not yvalues then
                             points = nil
@@ -1117,9 +1157,11 @@
                         local s = 1
                         for i=1,nofaxis do
                             local f = factors[i]
-                            local start = start and start[i] or 0
                             local peak  = peak  and peak [i] or 0
-                            local stop  = stop  and stop [i] or 0
+                         -- local start = start and start[i] or 0
+                         -- local stop  = stop  and stop [i] or 0
+                            local start = start and start[i] or (peak < 0 and peak or 0)
+                            local stop  = stop  and stop [i] or (peak > 0 and peak or 0)
                             -- do we really need these tests ... can't we assume sane values
                             if start > peak or peak > stop then
                                 -- * 1
@@ -1150,8 +1192,24 @@
                         end
                     end
                     if shape.type == "glyph" then
+-- if fontdata.glyphs[i-1].name == "X" then
+--     if deltas then
+--         for i=1,#deltas do
+--             local d = deltas[i]
+--             local x = d.xvalues
+--             local y = d.yvalues
+--             if x and y then
+--                 for i=1,#x do
+--                     print(i-1,x[i],y[i])
+--                 end
+--             end
+--         end
+--     end
+-- end
                         applyaxis(glyphdata[i],shape,shape.points,deltas)
                     else
+                        -- todo: args_are_xy_values mess .. i have to be really bored
+                        -- and motivated to deal with it
                         shape.deltas = deltas
                     end
                 end

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv	2017-05-07 21:21:52 UTC (rev 44236)
@@ -28,7 +28,6 @@
         "font-one",
         "font-map",
         "font-fbk",
-        "font-gds",
     }
     local report    = logs.reporter("oldotf")
     local findfile  = resolvers.findfile

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/base/mkiv/spac-grd.mkiv	2017-05-07 21:21:52 UTC (rev 44236)
@@ -314,14 +314,14 @@
    \fi
    \endgroup}
 
-\unexpanded\def\spac_fake_next_line_old
-  {\par
-   \begingroup
-   \reseteverypar
-   \dontleavehmode\hpack to \zeropoint{\page_sides_anchor\hss\strut}% just a tracer
-   \vskip-\parskip
-   \vskip-\struttotal
-   \endgroup}
+% \unexpanded\def\spac_fake_next_line_old
+%   {\par
+%    \begingroup
+%    \reseteverypar
+%    \dontleavehmode\hpack to \zeropoint{\page_sides_anchor\hss\strut}% just a tracer
+%    \vskip-\parskip
+%    \vskip-\struttotal
+%    \endgroup}
 
 %let\fakenextstrutline\spac_fake_next_line_old
 \let\fakenextstrutline\spac_fake_next_line_new

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/status-files.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/base/mkiv/status-lua.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-koeielettersot.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-koeielettersot.mkiv	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/fonts/mkiv/type-imp-koeielettersot.mkiv	2017-05-07 21:21:52 UTC (rev 44236)
@@ -132,9 +132,9 @@
 
 \starttext
 
-\setupbodyfont[sheep]
+\setupbodyfont[cows]
 
-$1^1$
+\input tufte
 
 \stoptext
 

Modified: trunk/Master/texmf-dist/tex/context/interface/mkiv/i-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/interface/mkiv/i-readme.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua
===================================================================
--- trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.lua	2017-05-07 21:21:52 UTC (rev 44236)
@@ -15,7 +15,7 @@
 local rep         = string.rep
 
 local context = context
-local NC, NR, HL = context.NC, context.NR, context.HL
+local NC, NR, HL, ML = context.NC, context.NR, context.HL, context.ML
 local bold, monobold, mono, formattedmono = context.bold, context.monobold, context.mono, context.formatted.mono
 
 function moduledata.fonts.variable.showvariations(specification)
@@ -36,6 +36,7 @@
 
     if not fontdata then
         context.type("no font with name %a found",fontname)
+        return
     end
 
     local resources = fontdata.resources
@@ -119,21 +120,24 @@
                     local tag       = axis.tag
                     local name      = axis.name
                     local variants  = axis.variants
-                    local haslimits = variants[1].maximum
-                    local haslink   = variants[1].link
-                    for i=1,#variants do
-                        local variant = variants[i]
-                        NC() monobold(tag)
-                        NC() context(name)
-                        NC() context(variant.name)
-                        NC() formattedmono("0x%04x",variant.flags)
-                        NC() context(variant.value)
-                        NC() context(variant.minimum or "-")
-                        NC() context(variant.maximum or "-")
-                        NC() context(variant.link or "-")
-                        NC() NR()
-                        tag  = nil
-                        name = nil
+                    local first     = variants and variants[1]
+                    if first then
+                        local haslimits = first.maximum
+                        local haslink   = first.link
+                        for i=1,#variants do
+                            local variant = variants[i]
+                            NC() monobold(tag)
+                            NC() context(name)
+                            NC() context(variant.name)
+                            NC() formattedmono("0x%04x",variant.flags)
+                            NC() context(variant.value)
+                            NC() context(variant.minimum or "-")
+                            NC() context(variant.maximum or "-")
+                            NC() context(variant.link or "-")
+                            NC() NR()
+                            tag  = nil
+                            name = nil
+                        end
                     end
                 end
             context.stoptabulate()
@@ -175,7 +179,16 @@
     local collected = { }
 
     context.startsubject { title = "instances" }
-        if instances and #list > 0 then
+        if not instances or #instances == 0 or not list or #list == 0 then
+            context("no instances defined, incomplete \\type{fvar}/\\type{stat} table")
+        else
+            if #axis > 8 then
+                context.start()
+                context.switchtobodyfont { "small" }
+                if #axis > 12 then
+                    context.switchtobodyfont { "small" }
+                end
+            end
             context.starttabulate { "||" .. rep("c|",#list) .. "|" }
                 NC()
                 for i=1,#list do
@@ -185,7 +198,7 @@
                 local fullname = lower(stripstring(fontdata.shared.rawdata.metadata.fullname))
                 formattedmono("%s*",fullname)
                 NC() NR()
-                HL()
+                ML()
                 for k=1,#instances do
                     local i = instances[k]
                     NC() monobold(i.subfamily)
@@ -205,8 +218,9 @@
                     NC() NR()
                 end
             context.stoptabulate()
-        else
-            context("no instances defined, incomplete \\type{fvar} table")
+            if #axis > 8 then
+                context.stop()
+            end
         end
     context.stopsubject()
 

Modified: trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
===================================================================
--- trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv	2017-05-07 21:21:52 UTC (rev 44236)
@@ -32,8 +32,12 @@
 
 \usemodule[art-01]
 
+\setuphead[section][before={\testpage[5]\blank[2*big]}]
+
 \starttext
 
+%     \showfontkerns
+
     \showfontvariations
       [font=file:adobevfprototype.otf]
 
@@ -43,7 +47,20 @@
 %     \showfontvariations
 %       [font=file:kairossansvariable.ttf]
 
+%     \showfontvariations
+%       [font=file:sourcecode-regular.otf]
+
+%     \showfontvariations
+%       [font=file:AmstelvarAlpha-VF.ttf]
+
     \showfontvariations
-      [font=file:sourcecode-regular.otf]
+      [font=file:DecoVar-VF.ttf]
 
+    % This is Adam's version of noto .. has lots of instances so it takes a while
+    % the first time. Looks like I do somethign wrong (bad a's and widths).
+
+%     \showfontvariations
+%       [font=file:VotoSerifGX.ttf]
+
+
 \stoptext

Modified: trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua	2017-05-07 21:21:52 UTC (rev 44236)
@@ -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/17 01:00:26
+-- merge date  : 05/06/17 23:06:49
 
 do -- begin closure to overcome local limits and interference
 
@@ -9509,7 +9509,7 @@
     reader(f,fontdata,specification,...)
   end
 end
-local variablefonts_supported=context and true or false
+local variablefonts_supported=(context and true) or (logs and logs.application and true) or false
 local function readdata(f,offset,specification)
   local fontdata=loadtables(f,specification,offset)
   if specification.glyphs then
@@ -9560,6 +9560,8 @@
         else
           report("user instance: %s, bad factors",instance)
         end
+      else
+        report("unknown instance")
       end
     end
   end
@@ -12181,7 +12183,7 @@
       if false then
       else
         local contours=shape.contours
-        local nofcontours=#contours
+        local nofcontours=contours and #contours or 0
         local boundingbox=glyph.boundingbox or noboundingbox
         r=r+1 result[r]=toshort(nofcontours)
         r=r+1 result[r]=toshort(boundingbox[1]) 
@@ -12313,7 +12315,7 @@
     else
       x=x+readshort(f)
     end
-    points[i]={ x,y,bittest(flag,0x01) }
+    points[i]={ x,0,bittest(flag,0x01) }
   end
   local y=0
   for i=1,nofpoints do
@@ -12521,7 +12523,7 @@
     end
     local points={}
     local p=0
-    local n=1
+    local n=1 
     while p<count do
       local control=readbyte(f)
       local runreader=bittest(control,0x80) and readushort or readbyte
@@ -12538,22 +12540,24 @@
 local function readdeltas(f,nofpoints)
   local deltas={}
   local p=0
-  local n=0
-  local z=false
+  local z=0
   while nofpoints>0 do
     local control=readbyte(f)
+if not control then
+  break
+end
     local allzero=bittest(control,0x80)
-    local runreader=bittest(control,0x40) and readshort or readinteger
     local runlength=band(control,0x3F)+1
     if allzero then
-      z=runlength
+      z=z+runlength
     else
-      if z then
+      local runreader=bittest(control,0x40) and readshort or readinteger
+      if z>0 then
         for i=1,z do
           p=p+1
           deltas[p]=0
         end
-        z=false
+        z=0
       end
       for i=1,runlength do
         p=p+1
@@ -12567,6 +12571,36 @@
   else
   end
 end
+local function readdeltas(f,nofpoints)
+  local deltas={}
+  local p=0
+  while nofpoints>0 do
+    local control=readbyte(f)
+    if control then
+      local allzero=bittest(control,0x80)
+      local runlength=band(control,0x3F)+1
+      if allzero then
+        for i=1,runlength do
+          p=p+1
+          deltas[p]=0
+        end
+      else
+        local runreader=bittest(control,0x40) and readshort or readinteger
+        for i=1,runlength do
+          p=p+1
+          deltas[p]=runreader(f)
+        end
+      end
+      nofpoints=nofpoints-runlength
+    else
+      break
+    end
+  end
+  if p>0 then
+    return deltas
+  else
+  end
+end
 function readers.gvar(f,fontdata,specification,glyphdata,shapedata)
   local instance=specification.instance
   if not instance then
@@ -12581,7 +12615,7 @@
     local version=readulong(f) 
     local nofaxis=readushort(f)
     local noftuples=readushort(f)
-    local tupleoffset=readulong(f) 
+    local tupleoffset=tableoffset+readulong(f)
     local nofglyphs=readushort(f)
     local flags=readushort(f)
     local dataoffset=tableoffset+readulong(f)
@@ -12597,54 +12631,52 @@
         data[i]=2*readushort(f)
       end
     end
-    setposition(f,tableoffset+tupleoffset)
-    for i=1,noftuples do
-      tuples[i]=readtuplerecord(f,nofaxis) 
+    if noftuples>0 then
+      setposition(f,tupleoffset)
+      for i=1,noftuples do
+        tuples[i]=readtuplerecord(f,nofaxis)
+      end
     end
     local lastoffset=false
     for i=1,nofglyphs do 
-      local shape=shapedata[i-1] 
-      if shape then
-        local startoffset=dataoffset+data[i]
-        if startoffset==lastoffset then
+      local startoffset=dataoffset+data[i]
+      if startoffset==lastoffset then
+      else
+        local shape=shapedata[i-1] 
+        if not shape then
         else
           lastoffset=startoffset
           setposition(f,startoffset)
           local flags=readushort(f)
           local count=band(flags,0x0FFF)
-          local points=bittest(flags,0x8000)
           local offset=startoffset+readushort(f) 
           local deltas={}
-          local nofpoints=0
-          local allpoints=(shape.nofpoints or 0)+1
-          if points then
+          local allpoints=(shape.nofpoints or 0) 
+          local shared=false
+          local nofshared=0
+          if bittest(flags,0x8000) then
             local current=getposition(f)
             setposition(f,offset)
-            points,nofpoints=readpoints(f)
+            shared,nofshared=readpoints(f)
             offset=getposition(f)
             setposition(f,current)
-          else
-            points,nofpoints=nil,0
           end
-          for i=1,count do
-            local currentstart=getposition(f)
+          for j=1,count do
             local size=readushort(f) 
             local flags=readushort(f)
             local index=band(flags,0x0FFF)
             local haspeak=bittest(flags,0x8000)
             local intermediate=bittest(flags,0x4000)
-            local private=bittest(flags,0x1000)
+            local private=bittest(flags,0x2000)
             local peak=nil
             local start=nil
             local stop=nil
             local xvalues=nil
             local yvalues=nil
-            local points=points  
-            local nofpoints=nofpoints 
-            local advance=4
-            if peak then
+            local points=shared  
+            local nofpoints=nofshared
+            if haspeak then
               peak=readtuplerecord(f,nofaxis)
-              advance=advance+2*nofaxis
             else
               if index+1>#tuples then
                 print("error, bad index",index)
@@ -12654,21 +12686,22 @@
             if intermediate then
               start=readtuplerecord(f,nofaxis)
               stop=readtuplerecord(f,nofaxis)
-              advance=advance+4*nofaxis
             end
             if size>0 then
+              local current=getposition(f)
               setposition(f,offset)
               if private then
                 points,nofpoints=readpoints(f)
-              elseif nofpoints==0 then
-                nofpoints=allpoints
+              end 
+              if nofpoints==0 then
+                nofpoints=allpoints+4
               end
               if nofpoints>0 then
                 xvalues=readdeltas(f,nofpoints)
                 yvalues=readdeltas(f,nofpoints)
               end
-              offset=getposition(f)
-              setposition(f,currentstart+advance)
+              offset=offset+size
+              setposition(f,current)
             end
             if not xvalues and not yvalues then
               points=nil
@@ -12676,9 +12709,9 @@
             local s=1
             for i=1,nofaxis do
               local f=factors[i]
-              local start=start and start[i] or 0
               local peak=peak and peak [i] or 0
-              local stop=stop and stop [i] or 0
+              local start=start and start[i] or (peak<0 and peak or 0)
+              local stop=stop and stop [i] or (peak>0 and peak or 0)
               if start>peak or peak>stop then
               elseif start<0 and stop>0 and peak~=0 then
               elseif peak==0 then
@@ -25960,6 +25993,7 @@
 local tostring,next,format=tostring,next,string.format
 local round,max=math.round,math.round
 local sortedkeys,sortedhash=table.sortedkeys,table.sortedhash
+local setmetatableindex=table.setmetatableindex
 local formatters=string.formatters
 local tounicode=fonts.mappings.tounicode
 local otf=fonts.handlers.otf
@@ -25984,7 +26018,7 @@
   end
 end
 local sharedpalettes={}
-local hash=table.setmetatableindex(function(t,k)
+local hash=setmetatableindex(function(t,k)
   local v={ "special",k }
   t[k]=v
   return v
@@ -26051,7 +26085,7 @@
     if palettes then
       local converted=resources.converted
       if not converted then
-        converted=table.setmetatableindex(convert)
+        converted=setmetatableindex(convert)
         resources.converted=converted
       end
       local colorvalues=sharedpalettes[value] or converted[palettes[tonumber(value) or 1] or palettes[1]] or {}
@@ -26066,7 +26100,7 @@
       tfmdata.fonts={
         { id=0 }
       }
-      local widths=table.setmetatableindex(function(t,k)
+      local widths=setmetatableindex(function(t,k)
         local v={ "right",-k }
         t[k]=v
         return v
@@ -26073,23 +26107,30 @@
       end)
       local getactualtext=otf.getactualtext
       local default=colorvalues[#colorvalues]
-      local endactual=nil
+      local b,e=getactualtext(tounicode(0xFFFD))
       local start={ "special","pdf:page:q" }
       local stop={ "special","pdf:raw:Q" }
+      local actualb={ "special","pdf:page:"..b } 
+      local actuale={ "special","pdf:page:"..e }
+      local cache=setmetatableindex(function(t,k)
+        local v={ "char",k }
+        t[k]=v
+        return v
+      end)
       for unicode,character in next,characters do
         local description=descriptions[unicode]
         if description then
           local colorlist=description.colors
           if colorlist then
-            local b,e=getactualtext(tounicode(characters[unicode].unicode or 0xFFFD))
+            local u=description.unicode or characters[unicode].unicode
             local w=character.width or 0
             local s=#colorlist
-            local goback=w~=0 and widths[w] or nil
+            local goback=w~=0 and widths[w] or nil 
             local t={
               start,
-              { "special","pdf:raw:"..b }
+              not u and actualb or { "special","pdf:raw:"..getactualtext(tounicode(u)) }
             }
-            local n=#t
+            local n=2
             local l=nil
             for i=1,s do
               local entry=colorlist[i]
@@ -26098,15 +26139,12 @@
                 n=n+1 t[n]=v
                 l=v
               end
-              n=n+1 t[n]={ "char",entry.slot }
+              n=n+1 t[n]=cache[entry.slot]
               if s>1 and i<s and goback then
                 n=n+1 t[n]=goback
               end
             end
-            if not endactual then
-              endactual={ "special","pdf:page:"..e } 
-            end
-            n=n+1 t[n]=endactual
+            n=n+1 t[n]=actuale
             n=n+1 t[n]=stop
             character.commands=t
           end

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2017-05-07 09:20:39 UTC (rev 44235)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2017-05-07 21:21:52 UTC (rev 44236)
@@ -3841,7 +3841,7 @@
       print `cat $Jobid.log`;
     }
     close (TMP);
-    system ("$RM -f /tmp/$Jobid.log; mv $Jobid.log /tmp/"); # save last log
+    system ("$RM -f /tmp/$Jobid.log; mv $Jobid.log /tmp"); # save last log
     
     die "goodbye, exit status $status for $job\n"
       if $status != 0;



More information about the tex-live-commits mailing list