diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-ott.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/font-ott.lua | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-ott.lua b/Master/texmf-dist/tex/context/base/font-ott.lua index 47c2e0e9fe0..2be1bf06c00 100644 --- a/Master/texmf-dist/tex/context/base/font-ott.lua +++ b/Master/texmf-dist/tex/context/base/font-ott.lua @@ -87,7 +87,7 @@ otf.tables.scripts = { ['ugar'] = 'Ugaritic Cuneiform', ['xpeo'] = 'Old Persian Cuneiform', ['xsux'] = 'Sumero-Akkadian Cuneiform', - ['yi' ] = 'Yi' + ['yi' ] = 'Yi', } otf.tables.languages = { @@ -569,6 +569,7 @@ otf.tables.features = { ['rphf'] = 'Reph Form', ['rtbd'] = 'Right Bounds', ['rtla'] = 'Right-To-Left Alternates', + ['rtlm'] = 'Right To Left Math', -- math ['ruby'] = 'Ruby Notation Forms', ['salt'] = 'Stylistic Alternates', ['sinf'] = 'Scientific Inferiors', @@ -671,16 +672,24 @@ local to_scripts = otf.tables.to_scripts local to_languages = otf.tables.to_languages local to_features = otf.tables.to_features -for k, v in pairs(to_features) do +for k, v in next, to_features do local stripped = gsub(k,"%-"," ") to_features[stripped] = v local stripped = gsub(k,"[^a-zA-Z0-9]","") to_features[stripped] = v end -for k, v in pairs(to_features) do +for k, v in next, to_features do to_features[lower(k)] = v end +otf.meanings.checkers = { + rand = function(v) + return v and "random" + end +} + +local checkers = otf.meanings.checkers + function otf.meanings.normalize(features) local h = { } for k,v in next, features do @@ -709,7 +718,9 @@ function otf.meanings.normalize(features) v = b end end - h[to_features[k] or k] = v + k = to_features[k] or k + local c = checkers[k] + h[k] = c and c(v) or v end end return h |