summaryrefslogtreecommitdiff
path: root/tex/context/base/math-noa.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-09-14 15:40:28 +0300
committerMarius <mariausol@gmail.com>2013-09-14 15:40:28 +0300
commitcf9a3f78b35f0b3d57c4fe3f3e1cb4729d3e0218 (patch)
tree2ad64883f07f8f67d93b544a297371d08b62ae17 /tex/context/base/math-noa.lua
parentdf3ebd9b0781c6f5b017d592de50bf631b00d435 (diff)
downloadcontext-cf9a3f78b35f0b3d57c4fe3f3e1cb4729d3e0218.tar.gz
beta 2013.09.14 14:39
Diffstat (limited to 'tex/context/base/math-noa.lua')
-rw-r--r--tex/context/base/math-noa.lua50
1 files changed, 37 insertions, 13 deletions
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index 8a5d3f546..87c6ca8b5 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -235,27 +235,39 @@ families[math_char] = function(pointer)
local char = pointer.char
local bold = boldmap[char]
local newa = a - 3
- if bold then
+ if not bold then
+ if trace_families then
+ report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ end
+ pointer.fam = newa
+ elseif not fontcharacters[font_of_family(newa)][bold] then
+ if trace_families then
+ report_families("no bold character for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ end
+ if newa > 3 then
+ pointer.fam = newa - 3
+ end
+ else
pointer[a_exportstatus] = char
pointer.char = bold
if trace_families then
report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
end
+ pointer.fam = newa
+ end
+ else
+ local char = pointer.char
+ if not fontcharacters[font_of_family(a)][char] then
+ if trace_families then
+ report_families("no bold replacement for %C",char)
+ end
else
if trace_families then
- report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ report_families("family of %C becomes %s with remap %s",char,a,familymap[a])
end
+ pointer.fam = a
end
- pointer.fam = newa
- else
- if trace_families then
- local char = pointer.char
- report_families("family of %C becomes %s with remap %s",char,a,familymap[a])
- end
- pointer.fam = a
end
- else
- -- pointer.fam = 0
end
end
end
@@ -269,8 +281,20 @@ families[math_delim] = function(pointer)
-- no bold delimiters in unicode
a = a - 3
end
- pointer.small_fam = a
- pointer.large_fam = a
+ local char = pointer.small_char
+ local okay = fontcharacters[font_of_family(a)][char]
+ if okay then
+ pointer.small_fam = a
+ elseif a > 2 then
+ pointer.small_fam = a - 3
+ end
+ local char = pointer.large_char
+ local okay = fontcharacters[font_of_family(a)][char]
+ if okay then
+ pointer.large_fam = a
+ elseif a > 2 then
+ pointer.large_fam = a - 3
+ end
else
pointer.small_fam = 0
pointer.large_fam = 0