summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/typo-itc.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-01-25 20:34:48 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-01-25 20:34:48 +0100
commit55575b7cad42dac55b4a5f699c33363489cb502d (patch)
tree90b2fd06d12f00dab66e28824744c345a7f6703a /tex/context/base/mkiv/typo-itc.lua
parent3861c9ef2ffeffe824f05a255534d61800e27e7a (diff)
downloadcontext-55575b7cad42dac55b4a5f699c33363489cb502d.tar.gz
2019-01-25 20:15:00
Diffstat (limited to 'tex/context/base/mkiv/typo-itc.lua')
-rw-r--r--tex/context/base/mkiv/typo-itc.lua22
1 files changed, 15 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/typo-itc.lua b/tex/context/base/mkiv/typo-itc.lua
index 6cd3caf88..2683eecc3 100644
--- a/tex/context/base/mkiv/typo-itc.lua
+++ b/tex/context/base/mkiv/typo-itc.lua
@@ -124,14 +124,22 @@ local function okay(data,current,font,prevchar,previtalic,char,what)
return false
end
if threshold then
- local ht = getheight(current)
- local ex = exheights[font]
- local th = threshold * ex
- if ht <= th then
- if trace_italics then
- report_italics("ignoring correction between %s italic %C and regular %C, height %p less than threshold %p",prevchar,what,char,ht,th)
+ -- if getid(current) == glyph_code then
+ while current and getid(current) ~= glyph_code do
+ current = getprev(current)
+ end
+ if current then
+ local ht = getheight(current)
+ local ex = exheights[font]
+ local th = threshold * ex
+ if ht <= th then
+ if trace_italics then
+ report_italics("ignoring correction between %s italic %C and regular %C, height %p less than threshold %p",prevchar,what,char,ht,th)
+ end
+ return false
end
- return false
+ else
+ -- maybe backtrack to glyph
end
end
if trace_italics then