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-dsp.lua18
-rw-r--r--tex/context/base/mkiv/font-mis.lua2
-rw-r--r--tex/context/base/mkiv/font-otl.lua2
-rw-r--r--tex/context/base/mkiv/font-otr.lua3
-rw-r--r--tex/context/base/mkiv/font-ots.lua4
-rw-r--r--tex/context/base/mkiv/font-prv.lua16
-rw-r--r--tex/context/base/mkiv/font-ttf.lua44
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv36
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24588 -> 24597 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin264506 -> 264620 bytes
12 files changed, 89 insertions, 40 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 820a372bb..642c58bd3 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{2022.12.01 12:38}
+\newcontextversion{2022.12.05 18:49}
%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 d7a655b4f..60320035e 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{2022.12.01 12:38}
+\edef\contextversion{2022.12.05 18:49}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 80e623929..6ed0c04d1 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -234,6 +234,24 @@ local read_integer = {
streamreader.readinteger4,
}
+directives.register("fonts.streamreader",function()
+
+ read_cardinal = {
+ streamreader.readcardinal1,
+ streamreader.readcardinal2,
+ streamreader.readcardinal3,
+ streamreader.readcardinal4,
+ }
+
+ read_integer = {
+ streamreader.readinteger1,
+ streamreader.readinteger2,
+ streamreader.readinteger3,
+ streamreader.readinteger4,
+ }
+
+end)
+
-- Traditionally we use these unique names (so that we can flatten the lookup list
-- (we create subsets runtime) but I will adapt the old code to newer names.
diff --git a/tex/context/base/mkiv/font-mis.lua b/tex/context/base/mkiv/font-mis.lua
index 4937dca31..e00c84e40 100644
--- a/tex/context/base/mkiv/font-mis.lua
+++ b/tex/context/base/mkiv/font-mis.lua
@@ -21,7 +21,7 @@ local readers = otf.readers
if readers then
- otf.version = otf.version or 3.130
+ otf.version = otf.version or 3.131
otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true)
function fonts.helpers.getfeatures(name,save)
diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua
index fc101c9c9..7114f5ba2 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.130 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.131 -- 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-otr.lua b/tex/context/base/mkiv/font-otr.lua
index 0b4bb65bb..1e6f94e45 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -1190,6 +1190,9 @@ readers.hmtx = function(f,fontdata,specification)
-- if leftsidebearing ~= 0 then
-- glyph.lsb = leftsidebearing
-- end
+-- if leftsidebearing ~= 0 then
+-- glyph.lsb = leftsidebearing
+-- end
end
-- The next can happen in for instance a monospace font or in a cjk font
-- with fixed widths.
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index b3055976a..6d7c5fb25 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -2448,7 +2448,7 @@ local function chaindisk(head,start,dataset,sequence,rlmode,skiphash,ck)
if useddisc and start ~= usedstart then -- make this option per font -- new 2022-09-25
start = getnext(start) -- new 2022-09-25
end -- new 2022-09-25
- return head, start, done, useddisc -- new 2022-09-25
+ return head, start, done, useddisc -- new 2022-09-25
end
local chaintrac do
@@ -2971,7 +2971,7 @@ handlers.gpos_context = handle_contextchain
-- end
-- new 2022-09-25
-
+
local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode,skiphash)
local steps = currentlookup.steps
local nofsteps = currentlookup.nofsteps
diff --git a/tex/context/base/mkiv/font-prv.lua b/tex/context/base/mkiv/font-prv.lua
index e613eb7d3..59b793444 100644
--- a/tex/context/base/mkiv/font-prv.lua
+++ b/tex/context/base/mkiv/font-prv.lua
@@ -83,6 +83,22 @@ function helpers.newprivateslot(name)
return sharedprivates[name]
end
+function helpers.isprivate(unicode)
+ if unicode < 0xD7FF or (unicode > 0xDFFF and unicode <= 0xFFFF) then
+ return false
+ elseif unicode >= 0x00E000 and unicode <= 0x00F8FF then
+ return true
+ elseif unicode >= 0x0F0000 and unicode <= 0x0FFFFF then
+ return true
+ elseif unicode >= 0x100000 and unicode <= 0x10FFFF then
+ return true
+ elseif unicode >= 0x00D800 and unicode <= 0x00DFFF then
+ return true
+ else
+ return false
+ end
+end
+
do
local context = context
diff --git a/tex/context/base/mkiv/font-ttf.lua b/tex/context/base/mkiv/font-ttf.lua
index 0f3838c88..1fee9fa88 100644
--- a/tex/context/base/mkiv/font-ttf.lua
+++ b/tex/context/base/mkiv/font-ttf.lua
@@ -230,20 +230,7 @@ local function applyaxis(glyph,shape,deltas,dowidth)
if dowidth then
cnt = cnt - 4
end
- if cnt == 1 then
- local d = dpoints[1]
- local x = xvalues[d] * factor
- local y = yvalues[d] * factor
- for i=1,nofpoints do
- local p = points[i]
- if x ~= 0 then
- p[1] = p[1] + x
- end
- if y ~= 0 then
- p[2] = p[2] + y
- end
- end
- elseif cnt > 0 then
+ if cnt > 0 then
-- Not the most efficient solution but we seldom do this. We
-- actually need to avoid the extra points here but I'll deal
-- with that when needed.
@@ -265,14 +252,13 @@ local function applyaxis(glyph,shape,deltas,dowidth)
lastindex = currentindex
break
elseif found > last then
-
--- \definefontfeature[book][default][axis={weight=800}]
--- \definefont[testfont][file:Commissioner-vf-test.ttf*book]
--- \testfont EΘÄΞ
-while lastindex > 1 and dpoints[lastindex] > last do
- lastindex = lastindex - 1
-end
-
+ -- \definefontfeature[book][default][axis={weight=800}]
+ -- \definefont[testfont][file:Commissioner-vf-test.ttf*book]
+ -- \testfont EΘÄΞ
+ while lastindex > 1 and dpoints[lastindex] > last do
+ lastindex = lastindex - 1
+ end
+ --
break
end
end
@@ -351,6 +337,7 @@ end
end
else
fx = (p2x - p1x)/(p3x - p1x)
+-- fx = round(fx)
fx = (1 - fx) * x1 + fx * x3
end
--
@@ -374,6 +361,7 @@ end
end
else
fy = (p2y - p1y)/(p3y - p1y)
+-- fy = round(fy)
fy = (1 - fy) * y1 + fy * y3
end
-- -- maybe:
@@ -777,6 +765,18 @@ local function contours2outlines_shaped(glyphs,shapes,keepcurve)
end
first = last + 1
end
+ -- See readers.hvar where we set the delta lsb as well as the adapted
+ -- width. At this point we do know the boundingbox's llx. The xmax is
+ -- not that relevant. It needs more testing!
+ --
+ xmin = glyph.boundingbox[1]
+ --
+ local dlsb = glyph.dlsb
+ if dlsb then
+ xmin = xmin + dlsb
+ glyph.dlsb = nil -- save space
+ end
+ --
glyph.boundingbox = { round(xmin), round(ymin), round(xmax), round(ymax) }
end
end
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index 94b50c12a..ca6cccf73 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -324,18 +324,30 @@
% e.g.: \definemathematics[i:mp][setups=i:tight,openup=yes]
-\newmuskip\defaultthickmuskip \defaultthickmuskip 5mu plus 5mu
-\newmuskip\defaultmedmuskip \defaultmedmuskip 4mu plus 2mu minus 4mu
-\newmuskip\defaultthinmuskip \defaultthinmuskip 3mu
-
-\newmuskip\halfthickmuskip \halfthickmuskip 2.5mu plus 2.5mu
-\newmuskip\halfmedmuskip \halfmedmuskip 2.0mu plus 1.0mu minus 2.0mu
-\newmuskip\halfthinmuskip \halfthinmuskip 1.5mu
-
-\newcount \defaultrelpenalty \defaultrelpenalty 500
-\newcount \defaultbinoppenalty \defaultbinoppenalty 700
-\newcount \defaultprerelpenalty \defaultprerelpenalty -100
-\newcount \defaultprebinoppenalty \defaultprebinoppenalty -100
+\newmuskip\defaultthickmuskip \defaultthickmuskip 5mu plus 5mu
+\newmuskip\defaultmedmuskip \defaultmedmuskip 4mu plus 2mu minus 4mu
+\newmuskip\defaultthinmuskip \defaultthinmuskip 3mu
+
+\newmuskip\halfthickmuskip \halfthickmuskip 2.5mu plus 2.5mu
+\newmuskip\halfmedmuskip \halfmedmuskip 2.0mu plus 1.0mu minus 2.0mu
+\newmuskip\halfthinmuskip \halfthinmuskip 1.5mu
+
+\newcount \defaultrelpenalty \defaultrelpenalty 500
+\newcount \defaultbinoppenalty \defaultbinoppenalty 700
+\newcount \defaultprerelpenalty \defaultprerelpenalty -100
+\newcount \defaultprebinoppenalty \defaultprebinoppenalty -100
+\newcount \defaultdisplayprepenalty \defaultdisplayprepenalty -10
+
+% For the moment this way:
+
+\appendtoks
+ \setmathprepenalty \mathbinarycode \defaultdisplayprepenalty
+ % \setmathpostpenalty\mathbinarycode \zerocount
+ \setmathprepenalty \mathrelationcode \defaultdisplayprepenalty
+ % \setmathpostpenalty\mathrelationcode \zerocount
+ \setmathpostpenalty\mathtextpunctuationcode\defaultdisplayprepenalty
+ % \setmathprepenalty \mathtextpunctuationcode\zerocount
+\to \everybeforedisplayformula
% we need to control these otherwise:
%
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index da390abd8..24196b4e9 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 ffd8cb5f2..6c406bfa1 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ