summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-ots.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-07-16 12:33:09 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-07-16 12:33:09 +0200
commitf5566ab29fc08e71f6da12003ae49c48461bb70a (patch)
treed237bca10f0d71d7012cd8235a1478b12dcb890e /tex/context/base/mkiv/font-ots.lua
parent23b495f46b4d2e9264d54095f43774ef47d3a656 (diff)
downloadcontext-f5566ab29fc08e71f6da12003ae49c48461bb70a.tar.gz
2017-07-16 12:14:00
Diffstat (limited to 'tex/context/base/mkiv/font-ots.lua')
-rw-r--r--tex/context/base/mkiv/font-ots.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index 26659721f..54cacc543 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -148,11 +148,16 @@ local trace_compruns = false registertracker("otf.compruns", function
local trace_testruns = false registertracker("otf.testruns", function(v) trace_testruns = v end)
local forcediscretionaries = false
+local forcepairadvance = false -- for testing
directives.register("otf.forcediscretionaries",function(v)
forcediscretionaries = v
end)
+directives.register("otf.forcepairadvance",function(v)
+ forcepairadvance = v
+end)
+
local report_direct = logs.reporter("fonts","otf direct")
local report_subchain = logs.reporter("fonts","otf subchain")
local report_chain = logs.reporter("fonts","otf chain")
@@ -886,6 +891,8 @@ function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,step,i,inje
logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections")
end
start = snext -- cf spec
+ elseif forcepairadvance then
+ start = snext -- for testing
end
return head, start, true
elseif krn ~= 0 then
@@ -1463,7 +1470,7 @@ function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlm
break
elseif step.format == "pair" then
local a, b = krn[1], krn[2]
- if a then
+ if a == true then
-- zero
elseif a then
local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a,"injections") -- currentlookups flags?
@@ -1482,6 +1489,8 @@ function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlm
logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h)
end
start = snext -- cf spec
+ elseif forcepairadvance then
+ start = snext -- for testing
end
return head, start, true
elseif krn ~= 0 then
@@ -5332,7 +5341,7 @@ local function spaceinitializer(tfmdata,value) -- attr
right[k] = v[3]
else
local one = v[1]
- if one then
+ if one and one ~= true then
right[k] = one[3]
end
end