diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexko/luatexko.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexko/luatexko.lua | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua index c31745cf2bc..4ad352e08af 100644 --- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua +++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua @@ -74,6 +74,7 @@ end local glue_type_space = 13 local kern_type_itlc = 3 +local discnode = node.id("disc") local gluenode = node.id("glue") local glyphnode = node.id("glyph") local mathnode = node.id("math") @@ -87,6 +88,7 @@ local user_whatsit = node.subtype("user_defined") local n_copy_list = node.copy_list local nodedirect = node.direct +local d_getdisc = nodedirect.getdisc local d_todirect = nodedirect.todirect local d_tonode = nodedirect.tonode local d_has_field = nodedirect.has_field @@ -488,7 +490,7 @@ local function is_cjk_k (c) or (c >= 0xFE10 and c <= 0xFE1F ) or (c >= 0xFE30 and c <= 0xFE4F ) or (c >= 0xFF00 and c <= 0xFFEF ) - or (c >= 0x20000 and c <= 0x2FA1F) + or (c >= 0x20000 and c <= 0x2FFFD) or c == 0x00B0 or c == 0x2015 -- or c == 0x2018 or c == 0x2019 -- or c == 0x201C or c == 0x201D @@ -499,7 +501,7 @@ end local function is_hanja (c) return (c >= 0x3400 and c <= 0x9FFF ) or (c >= 0xF900 and c <= 0xFAFF ) - or (c >= 0x20000 and c <= 0x2FA1F) + or (c >= 0x20000 and c <= 0x2FFFD) end local function is_hangul (c) @@ -1501,9 +1503,7 @@ local function font_substitute(head) local curr = head while curr do local currid = d_getid(curr) - if currid == mathnode and d_getsubtype(curr) == 0 then - curr = d_end_of_math(curr) - elseif currid == glyphnode then + if currid == glyphnode then local currchar, currfont = d_getchar(curr), d_getfont(curr) if currchar then if is_unicode_vs(currchar) then -- ideograph variation selectors @@ -1589,6 +1589,15 @@ local function font_substitute(head) end end end + elseif currid == mathnode then + if d_getsubtype(curr) == 0 then + curr = d_end_of_math(curr) + end + elseif currid == discnode then + local pre, post, replace = d_getdisc(curr) + if pre then font_substitute(pre) end + if post then font_substitute(post) end + if replace then font_substitute(replace) end end curr = d_getnext(curr) end |