summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-oto.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-10-17 15:43:08 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-10-17 15:43:08 +0200
commite5f189d9965a70c8f3043c07c7b07d41ef268e93 (patch)
treeea192c431e2762fbae01fdd44cb3a48278b06fc0 /tex/context/base/mkiv/font-oto.lua
parent9f36318b0e571bcbc93dc2112d01bbf2178ed020 (diff)
downloadcontext-e5f189d9965a70c8f3043c07c7b07d41ef268e93.tar.gz
2018-10-17 15:14:00
Diffstat (limited to 'tex/context/base/mkiv/font-oto.lua')
-rw-r--r--tex/context/base/mkiv/font-oto.lua52
1 files changed, 29 insertions, 23 deletions
diff --git a/tex/context/base/mkiv/font-oto.lua b/tex/context/base/mkiv/font-oto.lua
index 4b986bd3b..c32a7af25 100644
--- a/tex/context/base/mkiv/font-oto.lua
+++ b/tex/context/base/mkiv/font-oto.lua
@@ -415,36 +415,42 @@ local function checkmathreplacements(tfmdata,fullname,fixitalics)
for unicode, replacement in next, changed do
local u = characters[unicode]
local r = characters[replacement]
- local n = u.next
- local v = u.vert_variants
- local h = u.horiz_variants
- if fixitalics then
- -- quite some warnings on stix ...
- local ui = u.italic
- if ui and not r.italic then
+ if u and r then
+ local n = u.next
+ local v = u.vert_variants
+ local h = u.horiz_variants
+ if fixitalics then
+ -- quite some warnings on stix ...
+ local ui = u.italic
+ if ui and not r.italic then
+ if trace_preparing then
+ report_prepare("using %i units of italic correction from %C for %U",ui,unicode,replacement)
+ end
+ r.italic = ui -- print(ui,ri)
+ end
+ end
+ if n and not r.next then
if trace_preparing then
- report_prepare("using %i units of italic correction from %C for %U",ui,unicode,replacement)
+ report_prepare("forcing %s for %C substituted by %U","incremental step",unicode,replacement)
end
- r.italic = ui -- print(ui,ri)
+ r.next = n
end
- end
- if n and not r.next then
- if trace_preparing then
- report_prepare("forcing %s for %C substituted by %U","incremental step",unicode,replacement)
+ if v and not r.vert_variants then
+ if trace_preparing then
+ report_prepare("forcing %s for %C substituted by %U","vertical variants",unicode,replacement)
+ end
+ r.vert_variants = v
end
- r.next = n
- end
- if v and not r.vert_variants then
- if trace_preparing then
- report_prepare("forcing %s for %C substituted by %U","vertical variants",unicode,replacement)
+ if h and not r.horiz_variants then
+ if trace_preparing then
+ report_prepare("forcing %s for %C substituted by %U","horizontal variants",unicode,replacement)
+ end
+ r.horiz_variants = h
end
- r.vert_variants = v
- end
- if h and not r.horiz_variants then
+ else
if trace_preparing then
- report_prepare("forcing %s for %C substituted by %U","horizontal variants",unicode,replacement)
+ report_prepare("error replacing %C by %U",unicode,replacement)
end
- r.horiz_variants = h
end
end
end