summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv')
-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/font-con.lua11
-rw-r--r--tex/context/base/mkiv/font-otc.lua7
-rw-r--r--tex/context/base/mkiv/font-otl.lua2
-rw-r--r--tex/context/base/mkiv/font-oto.lua11
-rw-r--r--tex/context/base/mkiv/font-sol.lua2
-rw-r--r--tex/context/base/mkiv/good-ini.lua44
-rw-r--r--tex/context/base/mkiv/lang-txt.lua24
-rw-r--r--tex/context/base/mkiv/mult-low.lua2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24625 -> 24623 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin267345 -> 267946 bytes
-rw-r--r--tex/context/base/mkiv/typo-duc.lua14
13 files changed, 89 insertions, 32 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index f0fd15f3b..c7c28fc7c 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{2023.04.01 09:28}
+\newcontextversion{2023.04.11 22:45}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index c2735fa5e..aee10b279 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2023.04.01 09:28}
+\edef\contextversion{2023.04.11 22:45}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua
index 77708ee08..10f98ca12 100644
--- a/tex/context/base/mkiv/font-con.lua
+++ b/tex/context/base/mkiv/font-con.lua
@@ -6,6 +6,9 @@ if not modules then modules = { } end modules ['font-con'] = {
license = "see context related readme files"
}
+-- Todo: Enable fixes from the lmt to here. Also in font-oto.lua wrt the changed
+-- assignments. (Around texlive 2024 in order not to disturb generic.)
+
-- some names of table entries will be changed (no _)
local next, tostring, tonumber, rawget = next, tostring, tonumber, rawget
@@ -648,6 +651,14 @@ function constructors.scale(tfmdata,specification)
if changed then
local c = changed[unicode]
if c and c ~= unicode then
+ -- local cc = changed[c]
+ -- if cc then
+ -- while cc do
+ -- c = cc
+ -- cc = changed[c]
+ -- end
+ -- end
+ -- check not needed:
if c then
description = descriptions[c] or descriptions[unicode] or character
character = characters[c] or character
diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua
index f83c3e8ec..0787a2035 100644
--- a/tex/context/base/mkiv/font-otc.lua
+++ b/tex/context/base/mkiv/font-otc.lua
@@ -786,7 +786,12 @@ local function addfeature(data,feature,specifications,prepareonly)
local list = askedsteps[i]
local coverage = nil
local format = nil
- if featuretype == "substitution" then
+if type(list) == "function" then
+ list = list(data,specification,list,i)
+end
+ if not list then
+ -- see ebgaramond hack
+ elseif featuretype == "substitution" then
-- see font-imp-tweaks: we directly pass a mapping so no checks done
category = "gsub"
coverage = (mapping and list) or prepare_substitution(list,featuretype,nocheck)
diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua
index 354ca59a7..0825077b3 100644
--- a/tex/context/base/mkiv/font-otl.lua
+++ b/tex/context/base/mkiv/font-otl.lua
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.132 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.133 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.pngcache = containers.define("fonts", "png", otf.version, true)
diff --git a/tex/context/base/mkiv/font-oto.lua b/tex/context/base/mkiv/font-oto.lua
index e8b92c077..0689f4dfb 100644
--- a/tex/context/base/mkiv/font-oto.lua
+++ b/tex/context/base/mkiv/font-oto.lua
@@ -6,6 +6,9 @@ if not modules then modules = { } end modules ['font-oto'] = { -- original tex
license = "see context related readme files"
}
+-- Todo: Enable fixes from the lmt to here. Also in font-con.lua wrt the changed
+-- assignments. (Around texlive 2024 in order not to disturb generic.)
+
local concat, unpack = table.concat, table.unpack
local insert, remove = table.insert, table.remove
local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
@@ -260,7 +263,9 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
for i=1,#steps do
for unicode, data in next, steps[i].coverage do
if unicode ~= data then
+-- if not changed[unicode] then
changed[unicode] = data
+-- end
end
if trace_singles then
report_substitution(feature,sequence,descriptions,unicode,data)
@@ -273,7 +278,9 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
local replacement = data[alternate]
if replacement then
if unicode ~= replacement then
+-- if not changed[unicode] then
changed[unicode] = replacement
+-- end
end
if trace_alternatives then
report_alternate(feature,sequence,descriptions,unicode,replacement,value,"normal")
@@ -281,7 +288,9 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
elseif defaultalt == "first" then
replacement = data[1]
if unicode ~= replacement then
+-- if not changed[unicode] then
changed[unicode] = replacement
+-- end
end
if trace_alternatives then
report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
@@ -289,7 +298,9 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
elseif defaultalt == "last" then
replacement = data[#data]
if unicode ~= replacement then
+-- if not changed[unicode] then
changed[unicode] = replacement
+-- end
end
if trace_alternatives then
report_alternate(feature,sequence,descriptions,unicode,replacement,value,defaultalt)
diff --git a/tex/context/base/mkiv/font-sol.lua b/tex/context/base/mkiv/font-sol.lua
index b3b514a16..b194a6ca9 100644
--- a/tex/context/base/mkiv/font-sol.lua
+++ b/tex/context/base/mkiv/font-sol.lua
@@ -111,7 +111,7 @@ local whatsit_code = nodecodes.whatsit
local fontkern_code = kerncodes.fontkern
-local righttoleft_code = nodes.dirvalues.righttoleft
+local righttoleft_code = (tex.directioncodes and tex.directioncodes.righttoleft) or nodes.dirvalues.righttoleft -- LMTX
local userdefinedwhatsit_code = whatsitcodes.userdefined
diff --git a/tex/context/base/mkiv/good-ini.lua b/tex/context/base/mkiv/good-ini.lua
index df79adb61..33e79a5d4 100644
--- a/tex/context/base/mkiv/good-ini.lua
+++ b/tex/context/base/mkiv/good-ini.lua
@@ -9,12 +9,14 @@ if not modules then modules = { } end modules ['good-ini'] = {
-- depends on ctx
local type, next = type, next
-local gmatch = string.gmatch
-local sortedhash, insert = table.sortedhash, table.insert
+local gmatch, find, topattern = string.gmatch, string.find, string.topattern
+local sortedhash, insert, contains = table.sortedhash, table.insert, table.contains
local fonts = fonts
-local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
+local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
+local trace_extensions = false trackers.register("fonts.goodies.extensions", function(v) trace_extensions = v end)
+
local report_goodies = logs.reporter("fonts","goodies")
local allocate = utilities.storage.allocate
@@ -324,15 +326,43 @@ end
local function setextensions(tfmdata)
local goodies = tfmdata.goodies
if goodies then
+ local shared = tfmdata.shared
+ local metadata = shared and shared.rawdata and shared.rawdata.metadata
for i=1,#goodies do
local g = goodies[i]
local e = g.extensions
if e then
- local goodie = g.name or "unknown"
+ local goodie = g.name or "unknown"
+ local fontname = metadata and metadata.fontname
+ if trace_extensions then
+ report_goodies("checking extensions for font %a",fontname or "unknown")
+ end
for i=1,#e do
- local name = "extension-" .. i
- -- report_goodies("adding extension %s from %s",name,goodie)
- otf.enhancers.addfeature(tfmdata.shared.rawdata,name,e[i])
+ local entry = e[i]
+ local fnames = entry.fonts
+ local tnames = type(fnames)
+ local valid = false
+ if not fontname then
+ valid = true
+ elseif tnames == "table" then
+ if fnames[fontname] then
+ valid = true
+ elseif #fnames > 0 and contains(fnames,fontname) then
+ valid = true
+ end
+ elseif tnames == "string" then
+ fnames = topattern(fnames)
+ valid = find(fontname,fnames) and true
+ else
+ valid = true
+ end
+ if valid then
+ local name = "extension-" .. i
+ if trace_extensions then
+ report_goodies("adding extension %a from %a for font %a",name,goodie,fontname or "unknown")
+ end
+ otf.enhancers.addfeature(tfmdata.shared.rawdata,name,entry)
+ end
end
end
end
diff --git a/tex/context/base/mkiv/lang-txt.lua b/tex/context/base/mkiv/lang-txt.lua
index cb8053fb6..af1f42c47 100644
--- a/tex/context/base/mkiv/lang-txt.lua
+++ b/tex/context/base/mkiv/lang-txt.lua
@@ -1192,7 +1192,7 @@ data.labels={
["ar"]="ملحق ",
["be"]="Апендыцыт",
["ca"]="Apèndix ",
- ["cn"]="附录",
+ ["cn"]="附录 ",
["cs"]="Příloha ",
["da"]="Bilag ",
["de"]="Anhang ",
@@ -1473,7 +1473,7 @@ data.labels={
["be"]="Глава ",
["bg"]="Eпизод ",
["ca"]="Capítol ",
- ["cn"]={ "第", "章" },
+ ["cn"]={ "第 ", " 章" },
["cs"]="Kapitola ",
["da"]="",
["de"]="Kapitel ",
@@ -1774,7 +1774,7 @@ data.labels={
["be"]="Малюнак",
["bg"]="Фигура",
["ca"]="Figura ",
- ["cn"]="图",
+ ["cn"]="图 ",
["cs"]="Obrázek ",
["da"]="Figur ",
["de"]="Abbildung ",
@@ -1925,7 +1925,7 @@ data.labels={
["be"]="Графіка ",
["bg"]="Графичен ",
["ca"]="Gràfica ",
- ["cn"]="插图",
+ ["cn"]="插图 ",
["cs"]="Graf ",
["da"]="Grafik ",
["de"]="Grafik ",
@@ -2058,7 +2058,7 @@ data.labels={
["be"]="Інтэрмецца ",
["bg"]="Интермецо ",
["ca"]="Intermedi ",
- ["cn"]="퉣",
+ ["cn"]="퉣 ",
["cs"]="Intermezzo ",
["da"]="Intermezzo ",
["de"]="Intermezzo ",
@@ -2395,7 +2395,7 @@ data.labels={
["be"]="радок ",
["bg"]="ред ",
["ca"]="línia ",
- ["cn"]="行",
+ ["cn"]="行 ",
["cs"]="řádek ",
["da"]="linie ",
["de"]="Zeile ",
@@ -2441,7 +2441,7 @@ data.labels={
["be"]="радкi ",
["bg"]="редове ",
["ca"]="línies ",
- ["cn"]="行",
+ ["cn"]="行 ",
["cs"]="řádky ",
["da"]="linier ",
["de"]="Zeilen ",
@@ -3002,7 +3002,7 @@ data.labels={
["be"]="Частка ",
["bg"]="Частка ",
["ca"]="Part ",
- ["cn"]={ "第", "部分" },
+ ["cn"]={ "第 ", " 部分" },
["cs"]="Část ",
["da"]="Del ",
["de"]="Teil ",
@@ -3130,7 +3130,7 @@ data.labels={
["ar"]="فصل ",
["bg"]="Cекция ",
["ca"]="Secció ",
- ["cn"]={ "第", "节" },
+ ["cn"]={ "第 ", " 节" },
["cs"]="Sekce ",
["da"]="",
["de"]="Abschnitt ",
@@ -3513,7 +3513,7 @@ data.labels={
["be"]="Табліца ",
["bg"]="Таблица ",
["ca"]="Taula ",
- ["cn"]="表",
+ ["cn"]="表 ",
["cs"]="Tabulka ",
["da"]="Tabel ",
["de"]="Tabelle ",
@@ -3863,7 +3863,7 @@ data.labels={
["ar"]="الأشكال",
["be"]="Спіс ілюстрацый",
["ca"]="Figures",
- ["cn"]="图形",
+ ["cn"]="图",
["cs"]="Seznam obrázků",
["da"]="Figurer",
["de"]="Abbildungen",
@@ -4046,7 +4046,7 @@ data.labels={
["be"]="Лагатыпы",
["bg"]="Логотипи",
["ca"]="Logotips",
- ["cn"]="徽贬",
+ ["cn"]="徽标",
["cs"]="Loga",
["da"]="Logoer",
["de"]="Logos",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 686fbfb7a..8cc781034 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -146,7 +146,7 @@ return {
"startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes",
"doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes",
"startenvironment", "stopenvironment", "environment",
- "startcomponent", "stopcomponent", "component",
+ "startcomponent", "stopcomponent", "component", "startlocalcomponent", "stoplocalcomponent",
"startproduct", "stopproduct", "product",
"startproject", "stopproject", "project",
"starttext", "stoptext", "startnotext", "stopnotext",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 476b1642f..074d13f5d 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 734e7705c..e08a49d4e 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/typo-duc.lua b/tex/context/base/mkiv/typo-duc.lua
index 614defeb6..2f00fa038 100644
--- a/tex/context/base/mkiv/typo-duc.lua
+++ b/tex/context/base/mkiv/typo-duc.lua
@@ -599,23 +599,23 @@ local function resolve_weak(list,size,start,limit,orderbefore,orderafter)
else -- only more efficient when we have es/cs
local runner = start + 2
if runner <= limit then
- local before = list[start]
- local entry = list[start + 1]
- local after = list[runner]
+ local before = list[start]
+ local current = list[start + 1]
+ local after = list[runner]
while after do
- local direction = entry.direction
+ local direction = current.direction
if direction == "es" then
if before.direction == "en" and after.direction == "en" then
- entry.direction = "en"
+ current.direction = "en"
end
elseif direction == "cs" then
local prevdirection = before.direction
if prevdirection == "en" then
if after.direction == "en" then
- entry.direction = "en"
+ current.direction = "en"
end
elseif prevdirection == "an" and after.direction == "an" then
- entry.direction = "an"
+ current.direction = "an"
end
end
before = current