Improve detection
This commit is contained in:
parent
f4c0721401
commit
7341dd5fc6
@ -273,7 +273,7 @@ local function noad_to_table(noad, sub, cur_style, joining, bin_replacements, te
|
|||||||
end
|
end
|
||||||
if nucleus == core and #core == 1 then
|
if nucleus == core and #core == 1 then
|
||||||
if joining and joining[0] == 'mn' and core[0] == 'mi' and (core[1] == '.' or core[1] == ',') and maybe_to_mn(noad, core)
|
if joining and joining[0] == 'mn' and core[0] == 'mi' and (core[1] == '.' or core[1] == ',') and maybe_to_mn(noad, core)
|
||||||
or core[0] == 'mn' or text_families[core['tex:family']] then
|
or core[0] == 'mn' or text_families[core['tex:family'] or 0] then
|
||||||
if joining and core[0] == joining[0] and core['tex:family'] == joining['tex:family'] then
|
if joining and core[0] == joining[0] and core['tex:family'] == joining['tex:family'] then
|
||||||
joining[#joining+1] = core[1]
|
joining[#joining+1] = core[1]
|
||||||
local cnodes = core[':nodes']
|
local cnodes = core[':nodes']
|
||||||
|
@ -24,7 +24,7 @@ local text_families_meta = {__index = function(t, fam)
|
|||||||
-- FIXME(?): If there is no font...
|
-- FIXME(?): If there is no font...
|
||||||
error'Please load your fonts?!?'
|
error'Please load your fonts?!?'
|
||||||
end
|
end
|
||||||
assignment = not fontdir.MathConstants
|
assignment = not (fontdir.MathConstants and next(fontdir.MathConstants))
|
||||||
end
|
end
|
||||||
t[fam] = assignment
|
t[fam] = assignment
|
||||||
return assignment
|
return assignment
|
||||||
@ -50,6 +50,9 @@ lua.get_functions_table()[funcid] = function()
|
|||||||
local mapping = token.scan_string()
|
local mapping = token.scan_string()
|
||||||
if mappings[mapping] then
|
if mappings[mapping] then
|
||||||
register_family(fam, mappings[mapping])
|
register_family(fam, mappings[mapping])
|
||||||
|
if global_text_families[fam] == nil then
|
||||||
|
global_text_families[fam] = false
|
||||||
|
end
|
||||||
else
|
else
|
||||||
tex.error(string.format('Unknown font mapping %q', mapping))
|
tex.error(string.format('Unknown font mapping %q', mapping))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user