summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-18 00:35:21 +0000
committerKarl Berry <karl@freefriends.org>2010-11-18 00:35:21 +0000
commite1353b47437cbc7c93c601670ce39cc2bfede42d (patch)
treec0ac897fca6869614aae87b4f8786c80402a5409 /Master/texmf-dist/tex/luatex/luaotfload
parent4c2dc022d55819e130b372142518e7e869ec377f (diff)
luaotfload (17nov10)
git-svn-id: svn://tug.org/texlive/trunk@20475 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua57
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty13
2 files changed, 18 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
index cc3e3ed50ad..b5e2325041a 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
@@ -20,35 +20,16 @@ module('luaotfload', package.seeall)
luaotfload.module = {
name = "luaotfload",
- version = 1.20,
- date = "2010/10/16",
+ version = 1.21,
+ date = "2010/11/11",
description = "OpenType layout system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
license = "CC0"
}
-luatexbase.provides_module(luaotfload.module)
-
-
+local error, warning, info, log = luatexbase.provides_module(luaotfload.module)
kpse.init_prog('', 600, '/')
-
-
-local format = string.format
-
-local function log(...)
- luatexbase.module_log ('luaotfload', format(...))
-end
-
-local function error(...)
- luatexbase.module_error ('luaotfload', format(...))
-end
-
-local function warning(...)
- luatexbase.module_warning('luaotfload', format(...))
-end
-
-
local luatex_version = 60
if tex.luatexversion < luatex_version then
@@ -56,8 +37,6 @@ if tex.luatexversion < luatex_version then
tex.luatexversion/100,
luatex_version /100)
end
-
-
function luaotfload.loadmodule(name)
local tofind = 'otfl-'..name
local found = kpse.find_file(tofind,"tex")
@@ -68,21 +47,13 @@ function luaotfload.loadmodule(name)
error('file %s not found.', tofind)
end
end
-
-
luaotfload.loadmodule('luat-dum.lua') -- not used in context at all
luaotfload.loadmodule('luat-ovr.lua') -- override some luat-dum functions
luaotfload.loadmodule('data-con.lua') -- maybe some day we don't need this one
-
-
tex.attribute[0] = 0
-
-
luaotfload.loadmodule('font-ini.lua')
luaotfload.loadmodule('node-dum.lua')
luaotfload.loadmodule('node-inj.lua')
-
-
function attributes.private(name)
local attr = 'otfl@' .. name
local number = luatexbase.attributes[attr]
@@ -91,8 +62,6 @@ function attributes.private(name)
end
return number
end
-
-
luaotfload.loadmodule('font-tfm.lua')
luaotfload.loadmodule('font-cid.lua')
luaotfload.loadmodule('font-ott.lua')
@@ -107,16 +76,11 @@ luaotfload.loadmodule('font-otc.lua')
luaotfload.loadmodule('font-def.lua')
luaotfload.loadmodule('font-xtx.lua')
luaotfload.loadmodule('font-dum.lua')
-
-
if fonts and fonts.tfm and fonts.tfm.readers then
fonts.tfm.readers.ofm = fonts.tfm.readers.tfm
end
-
-
luaotfload.loadmodule('font-nms.lua')
luaotfload.loadmodule('font-clr.lua')
-
local function def_font(...)
local fontdata = fonts.define.read(...)
if type(fontdata) == "table" and fontdata.shared then
@@ -150,15 +114,22 @@ local function def_font(...)
mc["FractionDelimiterDisplayStyleSize"] = 2.39 * size
fontdata.MathConstants = mc
+ if mc["ScriptPercentScaleDown"] then
+ 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"]
+ else -- resort to plain TeX default
+ fontdata.parameters[11] = 50
+ end
end
end
return fontdata
end
-
fonts.mode = "node"
-
-
local register_base_sub = fonts.otf.features.register_base_substitution
local gsubs = {
"ss01", "ss02", "ss03", "ss04", "ss05",
@@ -170,8 +141,6 @@ 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,
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
index 4814924f393..bbc3aab9f8b 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
@@ -21,21 +21,20 @@
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \input luatextra.sty
+ \input luatexbase.sty
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2010/10/16 v1.20 OpenType layout system]
- \RequirePackage{luatextra}
+ [2010/11/11 v1.21 OpenType layout system]
+ \RequirePackage{luatexbase}
\fi
+\RequireLuaModule{lualibs}
\expandafter\edef\csname otfl@AtEnd\endcsname{%
\catcode64 \the\catcode64\relax
}
\catcode64 11
-
-
\def\otfl@off{
\directlua{luaotfload.unregister_callbacks()}
}
@@ -43,9 +42,7 @@
\def\otfl@on{
\directlua{luaotfload.register_callbacks()}
}
-
-
-\luatexUseModule{luaotfload}
+\RequireLuaModule{luaotfload}
\otfl@on