diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua | 55 |
1 files changed, 22 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua index b5e2325041a..e8ddf3fd463 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua @@ -9,6 +9,7 @@ -- -- Copyright (C) 2009-2010 by by Elie Roux <elie.roux@telecom-bretagne.eu> -- and Khaled Hosny <khaledhosny@eglug.org> +-- (Support: <lualatex-dev@tug.org>.) -- -- This work is under the CC0 license. -- @@ -20,8 +21,8 @@ module('luaotfload', package.seeall) luaotfload.module = { name = "luaotfload", - version = 1.21, - date = "2010/11/11", + version = 1.22, + date = "2011/01/25", description = "OpenType layout system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", @@ -81,6 +82,7 @@ if fonts and fonts.tfm and fonts.tfm.readers then end luaotfload.loadmodule('font-nms.lua') luaotfload.loadmodule('font-clr.lua') +luatexbase.create_callback("luaotfload.patch_font", "simple", function() end) local function def_font(...) local fontdata = fonts.define.read(...) if type(fontdata) == "table" and fontdata.shared then @@ -110,22 +112,22 @@ local function def_font(...) end end -- for \overwithdelims - mc["FractionDelimiterSize"] = 1.01 * size - mc["FractionDelimiterDisplayStyleSize"] = 2.39 * size + mc.FractionDelimiterSize = 1.01 * size + mc.FractionDelimiterDisplayStyleSize = 2.39 * size fontdata.MathConstants = mc if mc["ScriptPercentScaleDown"] then - fontdata.parameters[10] = mc["ScriptPercentScaleDown"] + fontdata.parameters[10] = mc.ScriptPercentScaleDown else -- resort to plain TeX default fontdata.parameters[10] = 70 end if mc["ScriptScriptPercentScaleDown"] then - fontdata.parameters[11] = mc["ScriptScriptPercentScaleDown"] + fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown else -- resort to plain TeX default fontdata.parameters[11] = 50 end end - + luatexbase.call_callback("luaotfload.patch_font", fontdata) end return fontdata end @@ -141,31 +143,18 @@ local gsubs = { for _,v in next, gsubs do register_base_sub(v) end -function luaotfload.register_callbacks() - luatexbase.add_to_callback('pre_linebreak_filter', - nodes.simple_font_handler, - 'luaotfload.pre_linebreak_filter') - luatexbase.add_to_callback('hpack_filter', - nodes.simple_font_handler, - 'luaotfload.hpack_filter') - luatexbase.reset_callback('define_font') - luatexbase.add_to_callback('define_font', - def_font, - 'luaotfload.define_font', 1) - luatexbase.add_to_callback('find_vf_file', - fonts.vf.find, - 'luaotfload.find_vf_file') -end - -function luaotfload.unregister_callbacks() - luatexbase.remove_from_callback('pre_linebreak_filter', - 'luaotfload.pre_linebreak_filter') - luatexbase.remove_from_callback('hpack_filter', - 'luaotfload.hpack_filter') - luatexbase.remove_from_callback('define_font', - 'luaotfload.define_font') - luatexbase.remove_from_callback('find_vf_file', - 'luaotfload.find_vf_file') -end +luatexbase.add_to_callback('pre_linebreak_filter', + nodes.simple_font_handler, + 'luaotfload.pre_linebreak_filter') +luatexbase.add_to_callback('hpack_filter', + nodes.simple_font_handler, + 'luaotfload.hpack_filter') +luatexbase.reset_callback('define_font') +luatexbase.add_to_callback('define_font', + def_font, + 'luaotfload.define_font', 1) +luatexbase.add_to_callback('find_vf_file', + fonts.vf.find, + 'luaotfload.find_vf_file') -- -- End of File `luaotfload.lua'. |