summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-vis.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-08-01 21:33:13 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-08-01 21:33:13 +0200
commit391b705af1c22eaa6027d18a146e8d3fafc8832f (patch)
tree5e3e1903b545c12d57e6aca4888c2200b176c91d /tex/context/base/mkiv/trac-vis.lua
parent4afd5f6ad89594e3d8387b2acebefb6f37cb0cad (diff)
downloadcontext-391b705af1c22eaa6027d18a146e8d3fafc8832f.tar.gz
2017-08-01 18:16:00
Diffstat (limited to 'tex/context/base/mkiv/trac-vis.lua')
-rw-r--r--tex/context/base/mkiv/trac-vis.lua19
1 files changed, 9 insertions, 10 deletions
diff --git a/tex/context/base/mkiv/trac-vis.lua b/tex/context/base/mkiv/trac-vis.lua
index 42098f3f8..c4a9d90bb 100644
--- a/tex/context/base/mkiv/trac-vis.lua
+++ b/tex/context/base/mkiv/trac-vis.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['trac-vis'] = {
}
local node, nodes, attributes, fonts, tex = node, nodes, attributes, fonts, tex
-local type = type
+local type, tonumber = type, tonumber
local gmatch = string.gmatch
local formatters = string.formatters
local compactfloat = number.compactfloat
@@ -368,7 +368,7 @@ local c_ligature = "trace:s"
local c_white = "trace:w"
local c_math = "trace:r"
local c_origin = "trace:o"
-local c_discretionary = "trace:o"
+local c_discretionary = "trace:d"
local c_expansion = "trace:o"
local c_positive_d = "trace:db"
@@ -383,7 +383,7 @@ local c_ligature_d = "trace:ds"
local c_white_d = "trace:dw"
local c_math_d = "trace:dr"
local c_origin_d = "trace:do"
-local c_discretionary_d = "trace:do"
+local c_discretionary_d = "trace:dd"
local c_expansion_d = "trace:do"
local function sometext(str,layer,color,textcolor,lap) -- we can just paste verbatim together .. no typesteting needed
@@ -976,11 +976,10 @@ local ruledkern do
local k_cache_h = caches["hkern"]
ruledkern = function(head,current,vertical)
- local kern = getkern(current)
- local info = (vertical and k_cache_v or k_cache_h)[kern]
- if info then
- -- print("kern hit")
- else
+ local kern = getkern(current)
+ local cache = vertical and k_cache_v or k_cache_h
+ local info = cache[kern]
+ if not info then
local amount = formatters["%s:%0.3f"](vertical and "VK" or "HK",kern*pt_factor)
if kern > 0 then
info = sometext(amount,l_kern,c_positive)
@@ -989,7 +988,7 @@ local ruledkern do
else
info = sometext(amount,l_kern,c_zero)
end
- (vertical and k_cache_v or k_cache_h)[kern] = info
+ cache[kern] = info
end
info = copy_list(info)
if vertical then
@@ -1003,7 +1002,7 @@ end
local ruleditalic do
- local i_cache = caches["itatalic"]
+ local i_cache = caches["italic"]
ruleditalic = function(head,current)
local kern = getkern(current)