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-cff.lua7
-rw-r--r--tex/context/base/mkiv/font-dsp.lua2
-rw-r--r--tex/context/base/mkiv/font-osd.lua53
-rw-r--r--tex/context/base/mkiv/font-ttf.lua6
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24763 -> 24781 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257564 -> 257575 bytes
8 files changed, 43 insertions, 29 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 2e2e914a1..9180cc403 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.01.06 19:47}
+\newcontextversion{2022.01.10 08:33}
%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 5ca6fbb50..0037516fe 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.01.06 19:47}
+\edef\contextversion{2022.01.10 08:33}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-cff.lua b/tex/context/base/mkiv/font-cff.lua
index 8ae4d755b..4258991c6 100644
--- a/tex/context/base/mkiv/font-cff.lua
+++ b/tex/context/base/mkiv/font-cff.lua
@@ -1931,7 +1931,8 @@ local result = { }
-- cff 1: (when cff2 strip them)
elseif t == 1 or t == 3 or t == 18 or operation == 23 then
p_getstem() -- at the start
- if true then
+ if version == "cff" then
+-- if true then
if top > 0 then
for i=1,top do
r = r + 1 ; result[r] = encode[stack[i]]
@@ -1946,6 +1947,7 @@ local result = { }
-- cff 1: (when cff2 strip them)
elseif t == 19 or t == 20 then
local s = p_getmask() or 0 -- after the stems
+-- if version == "cff" then
if true then
if top > 0 then
for i=1,top do
@@ -1969,7 +1971,8 @@ local result = { }
i = i + 1
elseif t == 13 then
hsbw()
- if version == "cff" then
+-- if version == "cff" then
+ if true then
-- we do a moveto over lsb
r = r + 1 ; result[r] = encode[lsb]
r = r + 1 ; result[r] = chars[22]
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 8d7c3d359..7028f7c08 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -3806,6 +3806,7 @@ function readers.hvar(f,fontdata,specification)
end
local tableoffset = gotodatatable(f,fontdata,"hvar",specification.variable)
if not tableoffset then
+ report("no hvar table, expect problems due to messy widths")
return
end
@@ -3823,7 +3824,6 @@ function readers.hvar(f,fontdata,specification)
if variationoffset > 0 then
regions, deltas = readvariationdata(f,variationoffset,factors)
end
-
if not regions then
-- for now .. what to do ?
return
diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua
index 1bdd20fd9..16228b88b 100644
--- a/tex/context/base/mkiv/font-osd.lua
+++ b/tex/context/base/mkiv/font-osd.lua
@@ -877,23 +877,16 @@ local function initializeconjuncts(tfmdata,value)
local resources = tfmdata.resources
local devanagari = resources.devanagari
if devanagari then
- local conjuncts = "auto"
- local conjuncts = "continue"
- local movematra = "auto"
+ -- quit was the old situation
+ local conjuncts = "auto" -- mixed|continue|quit|auto
+ local movematra = "auto" -- default|leftbeforebase|auto
if type(value) == "string" and value ~= "auto" then
value = settings_to_hash(value)
conjuncts = rawget(value,"conjuncts") or conjuncts
movematra = rawget(value,"movematra") or movematra
end
if conjuncts == "auto" then
- conjuncts = "continue"
- -- maybe some day we can figure out bad-fonts logic
- -- if script == "mlym" or script == "mlm2" or
- -- script == "taml" or script == "tml2" then
- -- conjuncts = "continue"
- -- else
- -- conjuncts = "quit"
- -- end
+ conjuncts = "mixed" -- for all scripts ?
end
if movematra == "auto" and
script == "mlym" or
@@ -905,9 +898,9 @@ local function initializeconjuncts(tfmdata,value)
devanagari.conjuncts = conjuncts
devanagari.movematra = movematra
--
--- if trace_steps then
+ if trace_steps then
report("conjuncts %a, movematra %a",conjuncts,movematra)
--- end
+ end
--
end
end
@@ -2470,21 +2463,28 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe
already_below_mark = true
elseif post_mark[v] and not already_post_mark then
already_post_mark = true
- elseif devanagarihash[font].conjuncts == "quit" then
+ elseif devanagarihash[font].conjuncts == "continue" then
+ -- for testing
+ else
return c
end
end
else
- if devanagarihash[font].conjuncts == "quit" then
- return c
- elseif pre_mark[v] and not already_pre_mark then
+ if pre_mark[v] and not already_pre_mark then
already_pre_mark = true
elseif post_mark[v] and not already_post_mark then
- already_post_mark = true
+ if devanagarihash[font].conjuncts == "mixed" then
+ -- for messy fonts
+ return c
+ else
+ already_post_mark = true
+ end
elseif below_mark[v] and not already_below_mark then
already_below_mark = true
elseif above_mark[v] and not already_above_mark then
already_above_mark = true
+ elseif devanagarihash[font].conjuncts == "continue" then
+ -- for testing
else
return c
end
@@ -2678,21 +2678,28 @@ local function analyze_next_chars_two(c,font)
already_below_mark = true
elseif post_mark[v] and not already_post_mark then
already_post_mark = true
- elseif devanagarihash[font].conjuncts == "quit" then
+ elseif devanagarihash[font].conjuncts == "continue" then
+ -- for testing
+ else
return c
end
end
else
- if devanagarihash[font].conjuncts == "quit" then
- return c
- elseif pre_mark[v] and not already_pre_mark then
+ if pre_mark[v] and not already_pre_mark then
already_pre_mark = true
elseif post_mark[v] and not already_post_mark then
- already_post_mark = true
+ if devanagarihash[font].conjuncts == "mixed" then
+ -- for messy fonts
+ return c
+ else
+ already_post_mark = true
+ end
elseif below_mark[v] and not already_below_mark then
already_below_mark = true
elseif above_mark[v] and not already_above_mark then
already_above_mark = true
+ elseif devanagarihash[font].conjuncts == "continue" then
+ -- for testing
else
return c
end
diff --git a/tex/context/base/mkiv/font-ttf.lua b/tex/context/base/mkiv/font-ttf.lua
index fc987d74c..a2658d595 100644
--- a/tex/context/base/mkiv/font-ttf.lua
+++ b/tex/context/base/mkiv/font-ttf.lua
@@ -207,6 +207,8 @@ end
-- We had two loops (going backward) but can do it in one loop .. but maybe we
-- should only accept fonts with proper hvar tables.
+-- dowidth is kind of hack ... fonts are not always ok wrt these extra points
+
local xv = { } -- we share this cache
local yv = { } -- we share this cache
@@ -241,7 +243,7 @@ local function applyaxis(glyph,shape,deltas,dowidth)
p[2] = p[2] + y
end
end
- else
+ elseif 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.
@@ -365,6 +367,8 @@ local function applyaxis(glyph,shape,deltas,dowidth)
pi[2] = pi[2] + factor * fy
end
end
+ else
+ report("bad deltapoint data, maybe a missing hvar table")
end
else
for i=1,nofpoints do
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index cda4f4219..c0645fa90 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 e8b4cfefc..2b7f03fa1 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ