summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-10-02 13:21:40 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-10-02 13:21:40 +0200
commit6ab4432f6fe56cc63e53aeb256c89f01a04fb84f (patch)
tree5b45957afb0df55f2d5f06d43e6ac1c17d9f94cc
parent7b12427f475e64e06f5dd7b537462b6d990526f6 (diff)
downloadcontext-6ab4432f6fe56cc63e53aeb256c89f01a04fb84f.tar.gz
2019-10-02 12:50:00
-rw-r--r--doc/context/documents/general/manuals/luametafun.pdfbin1900844 -> 1668894 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin887618 -> 887618 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin888963 -> 889147 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin893298 -> 893298 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin885347 -> 885344 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin891139 -> 891141 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin383721 -> 383721 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin471489 -> 471542 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin380233 -> 380233 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin383844 -> 383840 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin383132 -> 383132 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin382077 -> 382077 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin620289 -> 620285 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin881065 -> 880641 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin885448 -> 885453 bytes
-rw-r--r--doc/context/scripts/mkiv/mtx-cache.html2
-rw-r--r--doc/context/scripts/mkiv/mtx-cache.man6
-rw-r--r--doc/context/scripts/mkiv/mtx-cache.xml4
-rw-r--r--doc/context/sources/general/manuals/followingup/followingup-contents.tex2
-rw-r--r--doc/context/sources/general/manuals/followingup/followingup-titlepage.tex2
-rw-r--r--doc/context/sources/general/manuals/luametafun/luametafun-surface.tex14
-rw-r--r--scripts/context/lua/mtx-cache.lua99
-rw-r--r--scripts/context/lua/mtx-install.lua17
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkxl2
-rw-r--r--tex/context/base/mkiv/font-tpk.lua5
-rw-r--r--tex/context/base/mkiv/lpdf-emb.lua43
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26607 -> 26630 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin268646 -> 268646 bytes
-rw-r--r--tex/context/base/mkiv/syst-aux.mkxl35
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin893298 -> 893298 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61165 -> 61165 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
36 files changed, 134 insertions, 107 deletions
diff --git a/doc/context/documents/general/manuals/luametafun.pdf b/doc/context/documents/general/manuals/luametafun.pdf
index cc530630e..d0a19a3b5 100644
--- a/doc/context/documents/general/manuals/luametafun.pdf
+++ b/doc/context/documents/general/manuals/luametafun.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index fd324eeff..33234564e 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index 145170255..6b3768529 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 8aeaeaf09..8471d15b4 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index f83384805..20aa6e88e 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index e224ba312..f54ac45f8 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
index cba60a63a..be096cfa0 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
index 8b68e2cfb..6af69e8e5 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
index a0c9f0cc0..0ca8447f9 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
index af919948f..ece38b598 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
index a78ae6350..3d1e3f394 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
index 3380ec091..a6b35b0df 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
index 7c72d1f72..3a9c33053 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index e686f5b41..8b47f596c 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index b542ba111..fd120f187 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/scripts/mkiv/mtx-cache.html b/doc/context/scripts/mkiv/mtx-cache.html
index 475095eb4..264c03485 100644
--- a/doc/context/scripts/mkiv/mtx-cache.html
+++ b/doc/context/scripts/mkiv/mtx-cache.html
@@ -39,7 +39,7 @@
<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>--purge</th><td></td><td>remove not used files</td></tr>
+ <tr><th>--make</th><td></td><td>generate databases and formats</td></tr>
<tr><th>--erase</th><td></td><td>completely remove cache</td></tr>
<tr><th>--list</th><td></td><td>show cache</td></tr>
<tr><th/><td/><td/></tr>
diff --git a/doc/context/scripts/mkiv/mtx-cache.man b/doc/context/scripts/mkiv/mtx-cache.man
index 800548939..9128bba30 100644
--- a/doc/context/scripts/mkiv/mtx-cache.man
+++ b/doc/context/scripts/mkiv/mtx-cache.man
@@ -1,4 +1,4 @@
-.TH "mtx-cache" "1" "01-01-2019" "version 0.10" "ConTeXt & MetaTeX Cache Management"
+.TH "mtx-cache" "1" "01-01-2019" "version 1.01" "ConTeXt & MetaTeX Cache Management"
.SH NAME
mtx-cache - ConTeXt & MetaTeX Cache Management
.SH SYNOPSIS
@@ -11,8 +11,8 @@
.B ConTeXt & MetaTeX Cache Management
.SH OPTIONS
.TP
-.B --purge
-remove not used files
+.B --make
+generate databases and formats
.TP
.B --erase
completely remove cache
diff --git a/doc/context/scripts/mkiv/mtx-cache.xml b/doc/context/scripts/mkiv/mtx-cache.xml
index 4bd3acc3d..35225724b 100644
--- a/doc/context/scripts/mkiv/mtx-cache.xml
+++ b/doc/context/scripts/mkiv/mtx-cache.xml
@@ -3,12 +3,12 @@
<metadata>
<entry name="name">mtx-cache</entry>
<entry name="detail">ConTeXt &amp; MetaTeX Cache Management</entry>
- <entry name="version">0.10</entry>
+ <entry name="version">1.01</entry>
</metadata>
<flags>
<category name="basic">
<subcategory>
- <flag name="purge"><short>remove not used files</short></flag>
+ <flag name="make"><short>generate databases and formats</short></flag>
<flag name="erase"><short>completely remove cache</short></flag>
<flag name="list"><short>show cache</short></flag>
</subcategory>
diff --git a/doc/context/sources/general/manuals/followingup/followingup-contents.tex b/doc/context/sources/general/manuals/followingup/followingup-contents.tex
index bd6af6d81..3fbfc701a 100644
--- a/doc/context/sources/general/manuals/followingup/followingup-contents.tex
+++ b/doc/context/sources/general/manuals/followingup/followingup-contents.tex
@@ -1,4 +1,4 @@
-\startcomponent followingup-titlepage
+\startcomponent followingup-contents
\environment followingup-style
diff --git a/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex b/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex
index 1256c049a..0f46ee9ca 100644
--- a/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex
+++ b/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex
@@ -47,7 +47,7 @@
StopPage ;
\stopuseMPgraphic
-\startpagemakeup[pagestate=stop,doublesdided=no]
+\startpagemakeup[pagestate=stop] % doubledided=no
\startoverlay
% {luametatex} % for searching
{\scale[width=\paperwidth]{\ctxlua{document.graphic()}}}
diff --git a/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex b/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex
index 427187f95..0014fa725 100644
--- a/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex
+++ b/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex
@@ -91,20 +91,6 @@ The preliminary set of parameters is:
\LL
\stoptabulate
-\startplacefigure[reference=contour:10]
- \startcombination[3*3]
- {\getbuffer[10a]} {\bf bitmap edge}
- {\getbuffer[10b]} {\bf bitmap cell}
- {\getbuffer[10c]} {\bf bitmap none}
- {\getbuffer[10d]} {\bf shape shape}
- {\getbuffer[10e]} {\bf shape edge}
- {\getbuffer[10f]} {\bf shape none}
- {\getbuffer[10g]} {\bf band edge}
- {\getbuffer[10h]} {\bf band cell}
- {\getbuffer[10i]} {\bf band none}
- \stopcombination
-\stopplacefigure
-
\stopchapter
\stopcomponent
diff --git a/scripts/context/lua/mtx-cache.lua b/scripts/context/lua/mtx-cache.lua
index 56d3df188..4f378ff0a 100644
--- a/scripts/context/lua/mtx-cache.lua
+++ b/scripts/context/lua/mtx-cache.lua
@@ -12,12 +12,12 @@ local helpinfo = [[
<metadata>
<entry name="name">mtx-cache</entry>
<entry name="detail">ConTeXt &amp; MetaTeX Cache Management</entry>
- <entry name="version">0.10</entry>
+ <entry name="version">1.01</entry>
</metadata>
<flags>
<category name="basic">
<subcategory>
- <flag name="purge"><short>remove not used files</short></flag>
+ <flag name="make"><short>generate databases and formats</short></flag>
<flag name="erase"><short>completely remove cache</short></flag>
<flag name="list"><short>show cache</short></flag>
</subcategory>
@@ -48,97 +48,86 @@ scripts.cache = scripts.cache or { }
local function collect(path)
local all = dir.glob(path .. "/**/*")
- local tmas, tmcs, rest = { }, { }, { }
+ local ext = table.setmetatableindex("table")
for i=1,#all do
local name = all[i]
- local suffix = filesuffix(name)
- if suffix == "tma" then
- tmas[#tmas+1] = name
- elseif suffix == "tmc" then
- tmcs[#tmcs+1] = name
- else
- rest[#rest+1] = name
- end
+ local list = ext[filesuffix(name)]
+ list[#list+1] = name
end
- return tmas, tmcs, rest, all
+ return ext
end
-local function list(banner,path,tmas,tmcs,rest)
+local function list(banner,path,ext)
+ local total = 0
report("%s: %s",banner,path)
report()
- report("tma : %4i",#tmas)
- report("tmc : %4i",#tmcs)
- report("rest : %4i",#rest)
- report("total : %4i",#tmas+#tmcs+#rest)
+ for k, v in table.sortedhash(ext) do
+ total = total + #v
+ report("%-6s : %4i",k,#v)
+ end
+ report()
+ report("total : %4i",total)
report()
end
-local function purge(banner,path,list,all)
+local function erase(banner,path,list)
report("%s: %s",banner,path)
report()
- local fonts = environment.argument("fonts")
- local n = 0
- for i=1,#list do
- local filename = list[i]
- if find(filename,"luatex%-cache") then -- safeguard
- if fonts and not find(filename,"fonts") then
- -- skip
- elseif all then
+ for ext, list in table.sortedhash(list) do
+ local gone = 0
+ local kept = 0
+ for i=1,#list do
+ local filename = list[i]
+ if find(filename,"luatex%-cache") then
remove(filename)
- n = n + 1
- elseif not fonts or find(filename,"fonts") then
- local suffix = filesuffix(filename)
- if suffix == "tma" then
- local checkname = replacesuffix(filename,"tma","tmc")
- if isfile(checkname) then
- remove(filename)
- n = n + 1
- end
+ if isfile(filename) then
+ kept = kept + 1
+ else
+ gone = gone + 1
end
end
end
+ report("%-6s : %4i gone, %4i kept",ext,gone,kept)
end
- report("removed tma files : %i",n)
report()
- return n
end
-function scripts.cache.purge()
- local writable = caches.getwritablepath()
- local tmas, tmcs, rest = collect(writable)
- list("writable path",writable,tmas,tmcs,rest)
- purge("writable path",writable,tmas)
- list("writable path",writable,tmas,tmcs,rest)
+function scripts.cache.make()
+ os.execute("mtxrun --generate")
+ os.execute("context --make")
+ os.execute("mtxrun --script font --reload")
end
function scripts.cache.erase()
local writable = caches.getwritablepath()
- local tmas, tmcs, rest, all = collect(writable)
- list("writable path",writable,tmas,tmcs,rest)
- purge("writable path",writable,all,true)
- list("writable path",writable,tmas,tmcs,rest)
+ local groups = collect(writable)
+ list("writable path",writable,groups)
+ erase("writable path",writable,groups)
+ if environment.argument("make") then
+ scripts.cache.make()
+ end
end
function scripts.cache.list()
local readables = caches.getreadablepaths()
- local writable = caches.getwritablepath()
- local tmas, tmcs, rest = collect(writable)
- list("writable path",writable,tmas,tmcs,rest)
+ local writable = caches.getwritablepath()
+ local groups = collect(writable)
+ list("writable path",writable,groups)
for i=1,#readables do
local readable = readables[i]
if readable ~= writable then
- local tmas, tmcs = collect(readable)
- list("readable path",readable,tmas,tmcs,rest)
+ local groups = collect(readable)
+ list("readable path",readable,groups)
end
end
end
-if environment.argument("purge") then
- scripts.cache.purge()
-elseif environment.argument("erase") then
+if environment.argument("erase") then
scripts.cache.erase()
elseif environment.argument("list") then
scripts.cache.list()
+elseif environment.argument("make") then
+ scripts.cache.make()
elseif environment.argument("exporthelp") then
application.export(environment.argument("exporthelp"),environment.files[1])
else
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua
index 48b458897..cf6ba4e98 100644
--- a/scripts/context/lua/mtx-install.lua
+++ b/scripts/context/lua/mtx-install.lua
@@ -26,6 +26,7 @@ local helpinfo = [[
<flag name="goodies" value="string"><short>extra binaries (like scite and texworks)</short></flag>
<flag name="install"><short>install context</short></flag>
<flag name="update"><short>update context</short></flag>
+ <flag name="erase"><short>wipe the cache</short></flag>
<flag name="identify"><short>create list of files</short></flag>
</subcategory>
</category>
@@ -398,8 +399,15 @@ function install.update()
local server = environment.arguments.server or ""
local instance = environment.arguments.instance or ""
- local osplatform = environment.arguments.platform or os.platform
- local platform = platforms[osplatform]
+ local osplatform = environment.arguments.platform or nil
+ local platform = platforms[osplatform or os.platform or ""]
+
+ if platform == "unknown" and osplatform then
+ -- catches openbsdN.M kind of specifications
+ platform = osplatform
+ elseif not osplatform then
+ osplatform = platform
+ end
if server == "" then
server = "lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl,dmz.pragma-ade.nl"
@@ -531,8 +539,13 @@ function install.update()
end
run("%s --generate",mtxrunbin)
+ if environment.argument("erase") then
+ run("%s --script cache --erase",mtxrunbin)
+ run("%s --generate",mtxrunbin)
+ end
run("%s --make en", contextbin)
+
-- in calling script: update mtxrun.exe and mtxrun.lua
report("")
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index d7278d1a4..296525c5c 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2019.10.01 10:36}
+\newcontextversion{2019.10.02 12:43}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 25110cc9f..ed7ade881 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.10.01 10:36}
+\edef\contextversion{2019.10.02 12:43}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 08c80fddc..2236514eb 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2019.10.01 10:36}
+\newcontextversion{2019.10.02 12:43}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index a37681efa..87efea55e 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.10.01 10:36}
+\edef\contextversion{2019.10.02 12:43}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl
index bd0b8591d..c3552f09f 100644
--- a/tex/context/base/mkiv/context.mkxl
+++ b/tex/context/base/mkiv/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2019.10.01 10:36}
+\edef\contextversion{2019.10.02 12:43}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-tpk.lua b/tex/context/base/mkiv/font-tpk.lua
index 26e3fc0f0..bdfb0c2ee 100644
--- a/tex/context/base/mkiv/font-tpk.lua
+++ b/tex/context/base/mkiv/font-tpk.lua
@@ -282,7 +282,8 @@ ID %t
EI
Q]] ]
- function readers.pktopdf(glyph,width)
+ function readers.pktopdf(glyph,data,factor)
+ local width = data.width * factor
local xsize = glyph.xsize or 0
local ysize = glyph.ysize or 0
local xoffset = glyph.xoffset or 0
@@ -319,7 +320,7 @@ Q]] ]
r = r + 1 ; result[r] = char(extract(b,8,8))
end
end
- return template(width,llx,lly,urx,ury,xdpi,ydpi,llx,lly,xsize,ysize,result)
+ return template(width,llx,lly,urx,ury,xdpi,ydpi,llx,lly,xsize,ysize,result), width
end
function readers.loadpk(filename)
diff --git a/tex/context/base/mkiv/lpdf-emb.lua b/tex/context/base/mkiv/lpdf-emb.lua
index 0447ce9b0..eace34ca1 100644
--- a/tex/context/base/mkiv/lpdf-emb.lua
+++ b/tex/context/base/mkiv/lpdf-emb.lua
@@ -1545,19 +1545,24 @@ do
-- pk inclusion (not really tested but not really used either)
function methods.pk(filename)
- local resolution = 600
- local widthfactor = resolution / 72
- local scalefactor = 72 / resolution / 10
local pkfullname = resolvers.findpk(basedfontname,resolution)
if not pkfullname or pkfullname == "" then
return
end
local readers = fonts.handlers.tfm.readers
local result = readers.loadpk(pkfullname)
+ local convert = readers.pktopdf
if not result or result.error then
return
end
- return result.glyphs, widthfactor / 65536, scalefactor, readers.pktopdf
+ local resolution = 600
+ local widthfactor = resolution / 72
+ local scalefactor = 72 / resolution / 10
+ local factor = widthfactor / 65536
+ local function pktopdf(glyph,data)
+ return convert(glyph,data,factor) -- return pdfcode, width
+ end
+ return result.glyphs, scalefactor, pktopdf, false, false
end
-- not scaling in svg but here using a cm might be more efficient in terms of bytes
@@ -1576,7 +1581,8 @@ do
local units = details.parameters.units
local factor = units * bpfactor / scale
local fixdepth = pdfshapes.fixdepth
- local function pdftopdf(glyph,width,data)
+ local function pdftopdf(glyph,data)
+ local width = data.width or 0
local image = copypage(pdfdoc,glyph)
embedimage(image)
width = width * factor
@@ -1587,7 +1593,7 @@ do
local depth = data.depth or 0
local height = data.height or 0
if depth ~= 0 or height ~= 0 then
- return f_stream_d(width,(-height-depth)*factor,pdf), width
+ return f_image_d(width,(-height-depth)*factor,name), width
end
end
return f_image(width,name), width
@@ -1598,7 +1604,7 @@ do
local function getresources()
return pdfdictionary { XObject = xforms }
end
- return pdfshapes, 1, 1/units, pdftopdf, closepdf, getresources
+ return pdfshapes, 1/units, pdftopdf, closepdf, getresources
end
end
@@ -1614,7 +1620,8 @@ do
local units = details.parameters.units
local factor = units * bpfactor / scale
local fixdepth = mpshapes.fixdepth
- local function mpstopdf(mp,width,data)
+ local function mpstopdf(mp,data)
+ local width = data.width
if decompress then
mp = decompress(mp)
end
@@ -1634,7 +1641,7 @@ do
serialize = false,
}
end
- return mpshapes, 1, 1/units, mpstopdf, nil, getresources
+ return mpshapes, 1/units, mpstopdf, false, getresources
end
end
@@ -1654,7 +1661,8 @@ do
local xforms = pdfdictionary()
local nofglyphs = 0
if pngshapes then
- local function pngtopdf(glyph,width,data)
+ local function pngtopdf(glyph,data)
+ local width = data.width
local info = graphics.identifiers.png(glyph.data,"string")
local image = lpdf.injectors.png(info,"string")
embedimage(image)
@@ -1671,7 +1679,7 @@ do
local function getresources()
return pdfdictionary { XObject = xforms }
end
- return pngshapes, 1, 1, pngtopdf, closepng, getresources
+ return pngshapes, 1, pngtopdf, closepng, getresources
end
end
@@ -1680,7 +1688,7 @@ do
local colrvalues = details.properties.indexdata[2]
local usedfonts = { }
local dd = details.fontdata.descriptions -- temp hack
- local function colrtopdf(description,wd,data) -- todo: chardata instead of descriptions
+ local function colrtopdf(description,data)
-- descriptions by index
local colorlist = description.colors
if colorlist then
@@ -1717,7 +1725,7 @@ do
fontprefix = "V",
}
end
- return colrshapes, 1, 1, colrtopdf, false, getresources
+ return colrshapes, 1, colrtopdf, false, getresources
end
mainwriters["type3"] = function(details)
@@ -1728,8 +1736,7 @@ do
if not method then
return
end
- local glyphs, widthfactor, scalefactor,
- glyphtopdf, reset, getresources = method(basedfontname,details)
+ local glyphs, scalefactor, glyphtopdf, reset, getresources = method(basedfontname,details)
if not glyphs then
return
end
@@ -1770,12 +1777,8 @@ do
local name = f_index(index)
local glyph = glyphs[index]
if glyph then
- local width = widthfactor * data.width
- local stream, wd = glyphtopdf(glyph,width,data)
+ local stream, width = glyphtopdf(glyph,data)
if stream then
- if wd then
- width = wd
- end
if index - 1 ~= lastindex then
d = d + 1 differences[d] = index
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 9298a31e7..e62e508a4 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 6f7d7e6b5..b84c61b2e 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl
index c14e03008..7ade250d9 100644
--- a/tex/context/base/mkiv/syst-aux.mkxl
+++ b/tex/context/base/mkiv/syst-aux.mkxl
@@ -5957,6 +5957,41 @@
% \setmeasure {xxx}{1cm}
%D \macros
+%D {definequantity}
+%D
+%D These do the same but for numbers.
+
+\installsystemnamespace{quantity}
+
+\unexpanded\def\definequantity
+ {\dodoubleargument\syst_helpers_define_quantity}
+
+\def\syst_helpers_define_quantity[#1][#2]%
+ {\expandafter\def\csname\??quantity#1\endcsname{#2}}
+
+\unexpanded\def\freezequantity
+ {\dodoubleargument\syst_helpers_freeze_quantity}
+
+\def\syst_helpers_freeze_quantity[#1][#2]%
+ {\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}}
+
+\unexpanded\def\setquantity #1#2{\expandafter\def \csname\??quantity#1\endcsname{#2}} % quick way
+\unexpanded\def\setgquantity#1#2{\expandafter\gdef\csname\??quantity#1\endcsname{#2}} % quick way
+\unexpanded\def\setequantity#1#2{\expandafter\edef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
+\unexpanded\def\setxquantity#1#2{\expandafter\xdef\csname\??quantity#1\endcsname{\the\numexpr#2}} % quick way
+
+\def\quantity
+ {\the\quantitied}
+
+\def\quantitied#1%
+ {\numexpr\ifcsname\??quantity#1\endcsname\lastnamedcs\else\zeropoint\fi\relax}
+
+\def\directquantity#1%
+ {\the\numexpr#1\relax}
+
+% let\quantified\quantitied
+
+%D \macros
%D {dividedsize}
%D
%D This one can be used inside a measure (used in m4all):
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 8aeaeaf09..8471d15b4 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 66f97e2ec..87356b5f9 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.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 f23352419..9e38b5e5c 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 10/01/19 10:36:53
+-- merge date : 10/02/19 12:43:06
do -- begin closure to overcome local limits and interference