diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-06-27 20:17:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-06-27 20:17:00 +0200 |
commit | 3b02c6f2fbe02ac093a1738a2695597d4df486ec (patch) | |
tree | c3d9cb94443d216e6461bfdca88a427d55e66815 /tex/context/base/math-noa.lua | |
parent | c06e3acd4fc31d61e31a7172ae36bae6b929e20a (diff) | |
download | context-3b02c6f2fbe02ac093a1738a2695597d4df486ec.tar.gz |
beta 2011.06.27 20:17
Diffstat (limited to 'tex/context/base/math-noa.lua')
-rw-r--r-- | tex/context/base/math-noa.lua | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua index 28965a09a..e7258b1ca 100644 --- a/tex/context/base/math-noa.lua +++ b/tex/context/base/math-noa.lua @@ -600,7 +600,7 @@ local alternate = { } -- processors.alternate = alternate function mathematics.setalternate(fam,tag) local id = font_of_family(fam) local tfmdata = fontdata[id] - local mathalternates = tfmdata.shared.mathalternates + local mathalternates = tfmdata.shared and tfmdata.shared.mathalternates if mathalternates then local m = mathalternates[tag] tex.attribute[a_mathalternate] = m and m.attribute or attributes.unsetvalue @@ -630,15 +630,28 @@ end -- experiment (when not present fall back to fam 0) -local families = { } +-- 0-2 regular +-- 3-5 bold +-- 6-8 pseudobold +local families = { } local a_mathfamily = attributes.private("mathfamily") +local boldmap = mathematics.boldmap families[math_char] = function(pointer) - if pointer.fam == 255 then + if pointer.fam == 0 then local a = has_attribute(pointer,a_mathfamily) if a and a > 0 then set_attribute(pointer,a_mathfamily,0) + if a > 5 then + local char = pointer.char + local bold = boldmap[pointer.char] + if bold then + set_attribute(pointer,exportstatus,char) + pointer.char = bold + end + a = a - 3 + end pointer.fam = a else pointer.fam = 0 @@ -647,10 +660,14 @@ families[math_char] = function(pointer) end families[math_delim] = function(pointer) - if pointer.small_fam == 255 then + if pointer.small_fam == 0 then local a = has_attribute(pointer,a_mathfamily) if a and a > 0 then set_attribute(pointer,a_mathfamily,0) + if a > 5 then + -- no bold delimiters in unicode + a = a - 3 + end pointer.small_fam = a pointer.large_fam = a else |