diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-10-28 19:38:16 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-10-28 21:01:07 +0200 |
commit | 808e70bd7ccff7c25c4e1979bf9eec204ed8cb3c (patch) | |
tree | a05c80b7ee54f0c2e5829f6b88daa9bb49de3c50 /otfl-font-oti.lua | |
parent | e730ef56664f9394270348cad7176f72cc411e48 (diff) | |
download | luaotfload-808e70bd7ccff7c25c4e1979bf9eec204ed8cb3c.tar.gz |
Sync with context 2010.10.22
This is a big sync and things might be seriously broken.
Diffstat (limited to 'otfl-font-oti.lua')
-rw-r--r-- | otfl-font-oti.lua | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/otfl-font-oti.lua b/otfl-font-oti.lua index 4cb2706..e531ba8 100644 --- a/otfl-font-oti.lua +++ b/otfl-font-oti.lua @@ -6,19 +6,17 @@ if not modules then modules = { } end modules ['font-oti'] = { license = "see context related readme files" } --- i need to check features=yes|no also in relation to hashing - local lower = string.lower -local otf = fonts.otf +local fonts = fonts -otf.default_language = 'latn' -otf.default_script = 'dflt' +local otf = fonts.otf +local initializers = fonts.initializers -local languages = otf.tables.languages -local scripts = otf.tables.scripts +local languages = otf.tables.languages +local scripts = otf.tables.scripts -function otf.features.language(tfmdata,value) +local function set_language(tfmdata,value) if value then value = lower(value) if languages[value] then @@ -27,7 +25,7 @@ function otf.features.language(tfmdata,value) end end -function otf.features.script(tfmdata,value) +local function set_script(tfmdata,value) if value then value = lower(value) if scripts[value] then @@ -36,21 +34,24 @@ function otf.features.script(tfmdata,value) end end -function otf.features.mode(tfmdata,value) +local function set_mode(tfmdata,value) if value then tfmdata.mode = lower(value) end end -fonts.initializers.base.otf.language = otf.features.language -fonts.initializers.base.otf.script = otf.features.script -fonts.initializers.base.otf.mode = otf.features.mode -fonts.initializers.base.otf.method = otf.features.mode +local base_initializers = initializers.base.otf +local node_initializers = initializers.node.otf + +base_initializers.language = set_language +base_initializers.script = set_script +base_initializers.mode = set_mode +base_initializers.method = set_mode -fonts.initializers.node.otf.language = otf.features.language -fonts.initializers.node.otf.script = otf.features.script -fonts.initializers.node.otf.mode = otf.features.mode -fonts.initializers.node.otf.method = otf.features.mode +node_initializers.language = set_language +node_initializers.script = set_script +node_initializers.mode = set_mode +node_initializers.method = set_mode otf.features.register("features",true) -- we always do features table.insert(fonts.processors,"features") -- we need a proper function for doing this |