summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/typo-krn.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-09-12 09:56:30 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-09-12 09:56:30 +0200
commitfbf22006525c920e93b9f671c2af3d4df2be902e (patch)
tree34d00873adf1442775edd4aa8cd5edc7da73919f /tex/context/base/mkiv/typo-krn.lua
parentbfc2e20d0dfa0dfaf04b0c2c81aed20638f21c91 (diff)
downloadcontext-fbf22006525c920e93b9f671c2af3d4df2be902e.tar.gz
2016-09-12 08:18:00
Diffstat (limited to 'tex/context/base/mkiv/typo-krn.lua')
-rw-r--r--tex/context/base/mkiv/typo-krn.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua
index 5a42caeca..6a2aed9a2 100644
--- a/tex/context/base/mkiv/typo-krn.lua
+++ b/tex/context/base/mkiv/typo-krn.lua
@@ -102,7 +102,8 @@ typesetters.kerns = typesetters.kerns or { }
local kerns = typesetters.kerns
local report = logs.reporter("kerns")
-local trace_ligatures = false trackers.register("typesetters.kerns.ligatures",function(v) trace_ligatures = v end)
+local trace_ligatures = false trackers.register("typesetters.kerns.ligatures", function(v) trace_ligatures = v end)
+local trace_ligatures_d = false trackers.register("typesetters.kerns.ligatures.detail",function(v) trace_ligatures_d = v end)
-- use_advance is just an experiment: it makes copying glyphs (instead of new_glyph) dangerous
@@ -144,18 +145,24 @@ function kerns.keepligature(n) -- might become default
local c = getchar(n)
local d = fontdescriptions[f][c].name
if a > 0 and contextsetups[a].keepligatures == v_auto then
- report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"kept","dynamic","keepligatures")
+ if trace_ligatures_d then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"kept","dynamic","keepligatures")
+ end
setcolor(n,"darkred")
return true
end
local k = fontfeatures[f].keepligatures
if k == v_auto then
- report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"kept","static","keepligatures")
+ if trace_ligatures_d then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"kept","static","keepligatures")
+ end
setcolor(n,"darkgreen")
return true
end
if not k then
- report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"split","static","keepligatures")
+ if trace_ligatures_d then
+ report("font %!font:name!, glyph %a, slot %X -> ligature %s, by %s feature %a",f,d,c,"split","static","keepligatures")
+ end
resetcolor(n)
return false
end