diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-12-12 20:13:50 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-12-12 20:13:50 +0100 |
commit | 2683d42fe95c59c52a9d7c334292d0a5a15c030a (patch) | |
tree | 5ada28813a58ae1acea3fddf5f6a2e185d739c17 | |
parent | 989909187ebdac48c8cbc65a99840ed58d3f4f46 (diff) | |
download | context-2683d42fe95c59c52a9d7c334292d0a5a15c030a.tar.gz |
2019-12-12 19:34:00
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 Binary files differindex 459b8db4c..7d5ba5d59 100644 --- a/doc/context/documents/general/qrcs/setup-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf Binary files differindex 7f83b9101..4de3a7613 100644 --- a/doc/context/documents/general/qrcs/setup-de.pdf +++ b/doc/context/documents/general/qrcs/setup-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf Binary files differindex 0db39992b..89c42db3c 100644 --- a/doc/context/documents/general/qrcs/setup-en.pdf +++ b/doc/context/documents/general/qrcs/setup-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf Binary files differindex d25f27f10..39eb99a4b 100644 --- a/doc/context/documents/general/qrcs/setup-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf Binary files differindex eee61f07b..55a21295f 100644 --- a/doc/context/documents/general/qrcs/setup-it.pdf +++ b/doc/context/documents/general/qrcs/setup-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf Binary files differindex 5f49f47c6..7f58bed2a 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf Binary files differindex e37156c84..f47dcc1b6 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf Binary files differindex 9afc22e91..14639cdf7 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf Binary files differindex 8dfe5adca..b3dfb44a6 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf Binary files differindex 763b5410f..36ce46a26 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf Binary files differindex 97fbf025b..a0be8a33e 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf Binary files differindex c5cd7bd47..0f52ec04f 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf Binary files differindex 38770d3fb..fa63fa872 100644 --- a/doc/context/documents/general/qrcs/setup-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf Binary files differindex 0f7ff1e7d..04daf1c12 100644 --- a/doc/context/documents/general/qrcs/setup-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-ro.pdf 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(<number> n, <table> 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 -<table> p = font.getparameters(<number> n) +<table> f = font.copyfont(<number> 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 +<table> p = font.getparameters(<number> 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 <l n='lua'/> based variant was just faster. A days wasted day but an experience richer.</p> --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 "<unknown>" + author = onlyname or "<unknown>" 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 Binary files differindex 3ab12ae5b..f43c2b065 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 233714c09..b2189471f 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex 0db39992b..89c42db3c 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 0fe3ac1d5..fb21ea8ef 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf 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 |