From 2683d42fe95c59c52a9d7c334292d0a5a15c030a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 12 Dec 2019 20:13:50 +0100 Subject: 2019-12-12 19:34:00 --- doc/context/documents/general/qrcs/setup-cs.pdf | Bin 888019 -> 887962 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 889719 -> 889461 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 893979 -> 894125 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 886085 -> 886234 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 891688 -> 891907 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 383540 -> 383848 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 383860 -> 383879 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 380409 -> 380524 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 384093 -> 383780 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 383348 -> 383484 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 382004 -> 382157 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 620240 -> 620213 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 881181 -> 881352 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 886056 -> 886134 bytes .../general/manuals/luatex/luatex-fonts.tex | 10 ++++-- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/context.mkxl | 2 +- tex/context/base/mkiv/font-con.lua | 18 ++-------- tex/context/base/mkiv/font-ctx.lua | 20 +++++++++++ tex/context/base/mkiv/lpdf-wid.lua | 38 ++++++++++++--------- tex/context/base/mkiv/status-files.pdf | Bin 26571 -> 26570 bytes tex/context/base/mkiv/status-lua.pdf | Bin 269620 -> 268816 bytes tex/context/interface/mkiv/i-context.pdf | Bin 893979 -> 894125 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 61165 -> 61165 bytes tex/context/test/mkiv/pdf-a1a-2005.mkiv | 2 +- tex/context/test/mkiv/pdf-a1b-2005.mkiv | 2 +- tex/context/test/mkiv/pdf-a2a.mkiv | 2 +- tex/context/test/mkiv/pdf-a2b.mkiv | 2 +- tex/context/test/mkiv/pdf-a2u.mkiv | 2 +- tex/context/test/mkiv/pdf-a3a.mkiv | 2 +- tex/context/test/mkiv/pdf-a3b.mkiv | 2 +- tex/context/test/mkiv/pdf-a3u.mkiv | 2 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 8 +---- 36 files changed, 65 insertions(+), 55 deletions(-) diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index 459b8db4c..7d5ba5d59 100644 Binary files a/doc/context/documents/general/qrcs/setup-cs.pdf and b/doc/context/documents/general/qrcs/setup-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf index 7f83b9101..4de3a7613 100644 Binary files a/doc/context/documents/general/qrcs/setup-de.pdf and b/doc/context/documents/general/qrcs/setup-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf index 0db39992b..89c42db3c 100644 Binary files a/doc/context/documents/general/qrcs/setup-en.pdf and b/doc/context/documents/general/qrcs/setup-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf index d25f27f10..39eb99a4b 100644 Binary files a/doc/context/documents/general/qrcs/setup-fr.pdf and b/doc/context/documents/general/qrcs/setup-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf index eee61f07b..55a21295f 100644 Binary files a/doc/context/documents/general/qrcs/setup-it.pdf and b/doc/context/documents/general/qrcs/setup-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf index 5f49f47c6..7f58bed2a 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf and b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf index e37156c84..f47dcc1b6 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-de.pdf and b/doc/context/documents/general/qrcs/setup-mapping-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf index 9afc22e91..14639cdf7 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-en.pdf and b/doc/context/documents/general/qrcs/setup-mapping-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf index 8dfe5adca..b3dfb44a6 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf and b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf index 763b5410f..36ce46a26 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-it.pdf and b/doc/context/documents/general/qrcs/setup-mapping-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf index 97fbf025b..a0be8a33e 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf and b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf index c5cd7bd47..0f52ec04f 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf and b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index 38770d3fb..fa63fa872 100644 Binary files a/doc/context/documents/general/qrcs/setup-nl.pdf and b/doc/context/documents/general/qrcs/setup-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf index 0f7ff1e7d..04daf1c12 100644 Binary files a/doc/context/documents/general/qrcs/setup-ro.pdf and b/doc/context/documents/general/qrcs/setup-ro.pdf differ diff --git a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex index e5b6e1cb2..400550a96 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex @@ -728,14 +728,18 @@ font.setfont( n, f) Note that at the moment, each access to the \type {font.fonts} or call to \type {font.getfont} creates a \LUA\ table for the whole font unless you cached it. -This process can be quite slow. +If you want a copy of the internal data you can use \type {font.copyfont}: \startfunctioncall -
p = font.getparameters( n) +
f = font.copyfont( n) \stopfunctioncall This one will return a table of the parameters as known to \TEX. These can be -different from the ones in the cached table. +different from the ones in the cached table: + +\startfunctioncall +
p = font.getparameters( n) +\stopfunctioncall Also note the following: assignments can only be made to fonts that have already been defined in \TEX, but have not been accessed {\it at all\/} since that diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 5086e2879..646791414 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.12.12 13:04} +\newcontextversion{2019.12.12 19:23} %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 eb457e5f5..a495e5759 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.12.12 13:04} +\edef\contextversion{2019.12.12 19:23} %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 a5c18eb49..5116e2190 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.12.12 13:04} +\newcontextversion{2019.12.12 19:23} %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 1fab22308..e3d03915d 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.12.12 13:04} +\edef\contextversion{2019.12.12 19:23} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index 8618c229a..4df482faf 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.12.12 13:04} +\edef\contextversion{2019.12.12 19:23} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua index cd1b56c83..e42d20d4e 100644 --- a/tex/context/base/mkiv/font-con.lua +++ b/tex/context/base/mkiv/font-con.lua @@ -40,7 +40,6 @@ local setmetatableindex = table.setmetatableindex -- will be directives constructors.dontembed = allocate() -constructors.autocleanup = true constructors.namemode = "fullpath" -- will be a function constructors.version = 1.01 @@ -136,21 +135,10 @@ make this profitable and the based variant was just faster. A days wasted day but an experience richer.

--ldx]]-- --- we can get rid of the tfm instance when we have fast access to the --- scaled character dimensions at the tex end, e.g. a fontobject.width --- actually we already have some of that now as virtual keys in glyphs --- --- flushing the kern and ligature tables from memory saves a lot (only --- base mode) but it complicates vf building where the new characters --- demand this data .. solution: functions that access them - function constructors.cleanuptable(tfmdata) - if constructors.autocleanup and tfmdata.properties.virtualized then - for k, v in next, tfmdata.characters do - if v.commands then v.commands = nil end - -- if v.kerns then v.kerns = nil end - end - end + -- This no longer makes sense because the addition of font.getcopy and its + -- possible usage in generic implicates that we need to return the whole + -- lot now. end -- experimental, sharing kerns (unscaled and scaled) saves memory diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua index f6c81e76d..ca02d28cf 100644 --- a/tex/context/base/mkiv/font-ctx.lua +++ b/tex/context/base/mkiv/font-ctx.lua @@ -176,6 +176,26 @@ constructors.sharefonts = true -- experimental constructors.nofsharedhashes = 0 constructors.nofsharedvectors = 0 constructors.noffontsloaded = 0 +constructors.autocleanup = true + +-- we can get rid of the tfm instance when we have fast access to the +-- scaled character dimensions at the tex end, e.g. a fontobject.width +-- actually we already have some of that now as virtual keys in glyphs +-- +-- flushing the kern and ligature tables from memory saves a lot (only +-- base mode) but it complicates vf building where the new characters +-- demand this data .. solution: functions that access them + +-- font.getcopy = font.getfont -- we always want the table that context uses + +function constructors.cleanuptable(tfmdata) + if constructors.autocleanup and tfmdata.properties.virtualized then + for k, v in next, tfmdata.characters do + if v.commands then v.commands = nil end + -- if v.kerns then v.kerns = nil end + end + end +end do diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua index 835ec100a..d1c88ae35 100644 --- a/tex/context/base/mkiv/lpdf-wid.lua +++ b/tex/context/base/mkiv/lpdf-wid.lua @@ -271,16 +271,16 @@ lpdf.registerdocumentfinalizer(flushembeddedfiles,"embeddedfiles") function codeinjections.embedfile(specification) if enabled then - local data = specification.data - local filename = specification.file - local name = specification.name or "" - local title = specification.title or "" - local hash = specification.hash or filename - local keepdir = specification.keepdir -- can change - local usedname = specification.usedname - local filetype = specification.filetype - local compress = specification.compress - local mimetype = specification.mimetype or specification.mime + local data = specification.data + local filename = specification.file + local name = specification.name or "" + local title = specification.title or "" + local hash = specification.hash or filename + local keepdir = specification.keepdir -- can change + local usedname = specification.usedname + local filetype = specification.filetype + local compress = specification.compress + local mimetype = specification.mimetype or specification.mime if filename == "" then filename = nil end @@ -323,9 +323,10 @@ function codeinjections.embedfile(specification) end -- needs to be cleaned up: usedname = usedname ~= "" and usedname or filename or name - local basename = keepdir == true and usedname or basefilename(usedname) - local basename = gsub(basename,"%./","") - local savename = name ~= "" and name or basename + local basename = keepdir == true and usedname or basefilename(usedname) + local basename = gsub(basename,"%./","") + local savename = name ~= "" and name or basename + local foundname = specification.foundname or filename if not filetype or filetype == "" then filetype = name and (filename and filesuffix(filename)) or "txt" end @@ -339,7 +340,7 @@ function codeinjections.embedfile(specification) f = pdfflushstreamobject(data,a) specification.data = true -- signal that still data but already flushed else - local modification = modificationtime(specification.foundname or filename) + local modification = modificationtime(foundname) if attributes then a.Params = { Size = attributes.size, @@ -393,21 +394,22 @@ function nodeinjections.attachfile(specification) local title = specification.title or "" local subtitle = specification.subtitle or "" local author = specification.author or "" + local onlyname = filename and filenameonly(filename) or "" if registered == "" then registered = filename end if author == "" and title ~= "" then author = title - title = filename or "" + title = onlyname or "" end if author == "" then - author = filename or "" + author = onlyname or "" end if title == "" then title = registered end if title == "" and filename then - title = filenameonly(filename) + title = onlyname end local aref = attachments[registered] if not aref then @@ -438,6 +440,7 @@ function nodeinjections.attachfile(specification) CA = analyzetransparency(specification.transparencyvalue), AP = appearance, OC = analyzelayer(specification.layer), + F = 0, -- another rediculous need to satisfy validation (optional and zero is default) } local width = specification.width or 0 local height = specification.height or 0 @@ -529,6 +532,7 @@ function nodeinjections.comment(specification) -- brrr: seems to be done twice Name = name, NM = pdfstring("comment:"..nofcomments), AP = appearance, + F = 0, -- another rediculous need to satisfy validation (optional and zero is default) } local width = specification.width or 0 local height = specification.height or 0 diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 3ab12ae5b..f43c2b065 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 233714c09..b2189471f 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index 0db39992b..89c42db3c 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index 0fe3ac1d5..fb21ea8ef 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ diff --git a/tex/context/test/mkiv/pdf-a1a-2005.mkiv b/tex/context/test/mkiv/pdf-a1a-2005.mkiv index d7b2df9e0..ec767bf82 100644 --- a/tex/context/test/mkiv/pdf-a1a-2005.mkiv +++ b/tex/context/test/mkiv/pdf-a1a-2005.mkiv @@ -25,7 +25,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-1a:2005 \stopchapter diff --git a/tex/context/test/mkiv/pdf-a1b-2005.mkiv b/tex/context/test/mkiv/pdf-a1b-2005.mkiv index 9b0669c61..4df15a13f 100644 --- a/tex/context/test/mkiv/pdf-a1b-2005.mkiv +++ b/tex/context/test/mkiv/pdf-a1b-2005.mkiv @@ -19,7 +19,7 @@ \starttextcolor[rgbblack] % forced /DeviceGray causes problems; we need a trigger -Test it. +Test for PDF/A-1b:2005 \stoptextcolor diff --git a/tex/context/test/mkiv/pdf-a2a.mkiv b/tex/context/test/mkiv/pdf-a2a.mkiv index 35f1453eb..cf609dc75 100644 --- a/tex/context/test/mkiv/pdf-a2a.mkiv +++ b/tex/context/test/mkiv/pdf-a2a.mkiv @@ -27,7 +27,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-2a \stopchapter diff --git a/tex/context/test/mkiv/pdf-a2b.mkiv b/tex/context/test/mkiv/pdf-a2b.mkiv index 5c0d72244..d51d83025 100644 --- a/tex/context/test/mkiv/pdf-a2b.mkiv +++ b/tex/context/test/mkiv/pdf-a2b.mkiv @@ -25,7 +25,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-2b \stopchapter diff --git a/tex/context/test/mkiv/pdf-a2u.mkiv b/tex/context/test/mkiv/pdf-a2u.mkiv index 0b20abfe1..4ea175df1 100644 --- a/tex/context/test/mkiv/pdf-a2u.mkiv +++ b/tex/context/test/mkiv/pdf-a2u.mkiv @@ -25,7 +25,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-2u \stopchapter diff --git a/tex/context/test/mkiv/pdf-a3a.mkiv b/tex/context/test/mkiv/pdf-a3a.mkiv index 3d5dd48ca..0013d7a36 100644 --- a/tex/context/test/mkiv/pdf-a3a.mkiv +++ b/tex/context/test/mkiv/pdf-a3a.mkiv @@ -27,7 +27,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-3a \stopchapter diff --git a/tex/context/test/mkiv/pdf-a3b.mkiv b/tex/context/test/mkiv/pdf-a3b.mkiv index 31bbaeaba..2e1d8bbbb 100644 --- a/tex/context/test/mkiv/pdf-a3b.mkiv +++ b/tex/context/test/mkiv/pdf-a3b.mkiv @@ -25,7 +25,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-3b \stopchapter diff --git a/tex/context/test/mkiv/pdf-a3u.mkiv b/tex/context/test/mkiv/pdf-a3u.mkiv index 098d027fd..17112b542 100644 --- a/tex/context/test/mkiv/pdf-a3u.mkiv +++ b/tex/context/test/mkiv/pdf-a3u.mkiv @@ -25,7 +25,7 @@ \startchapter[title=aa,bookmark=bb,list=cc,marking=dd] -Test it +Test for PDF/A-3u \stopchapter diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 99e077949..a9bb1cd98 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 : 12/12/19 13:04:40 +-- merge date : 12/12/19 19:23:52 do -- begin closure to overcome local limits and interference @@ -8768,7 +8768,6 @@ fonts.handlers=handlers local allocate=utilities.storage.allocate local setmetatableindex=table.setmetatableindex constructors.dontembed=allocate() -constructors.autocleanup=true constructors.namemode="fullpath" constructors.version=1.01 constructors.cache=containers.define("fonts","constructors",constructors.version,false) @@ -8827,11 +8826,6 @@ function constructors.getmathparameter(tfmdata,name) end end function constructors.cleanuptable(tfmdata) - if constructors.autocleanup and tfmdata.properties.virtualized then - for k,v in next,tfmdata.characters do - if v.commands then v.commands=nil end - end - end end function constructors.calculatescale(tfmdata,scaledpoints) local parameters=tfmdata.parameters -- cgit v1.2.3