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
|
||||
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)
|
||||
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
|
||||
joining[#joining+1] = core[1]
|
||||
local cnodes = core[':nodes']
|
||||
|
@ -24,7 +24,7 @@ local text_families_meta = {__index = function(t, fam)
|
||||
-- FIXME(?): If there is no font...
|
||||
error'Please load your fonts?!?'
|
||||
end
|
||||
assignment = not fontdir.MathConstants
|
||||
assignment = not (fontdir.MathConstants and next(fontdir.MathConstants))
|
||||
end
|
||||
t[fam] = assignment
|
||||
return assignment
|
||||
@ -50,6 +50,9 @@ lua.get_functions_table()[funcid] = function()
|
||||
local mapping = token.scan_string()
|
||||
if mappings[mapping] then
|
||||
register_family(fam, mappings[mapping])
|
||||
if global_text_families[fam] == nil then
|
||||
global_text_families[fam] = false
|
||||
end
|
||||
else
|
||||
tex.error(string.format('Unknown font mapping %q', mapping))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user