summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/unicode-math
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-16 21:50:36 +0000
committerKarl Berry <karl@freefriends.org>2013-05-16 21:50:36 +0000
commita79508fde36800f3210ef48833ad94c7b486348e (patch)
tree4fcaebcee25355fb3ea7639d45d020f30ef04c81 /Master/texmf-dist/tex/latex/unicode-math
parentcd1e10881c760bc30c40a7845554fc9e32358a6c (diff)
unicode-math (16may13)
git-svn-id: svn://tug.org/texlive/trunk@30504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/unicode-math')
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua47
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty2
2 files changed, 32 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua
index c92a9f8dad3..66c830792bc 100644
--- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua
+++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua
@@ -16,27 +16,42 @@
-- This work is "maintained" by Will Robertson.
local err, warn, info, log = luatexbase.provides_module({
name = "unicode-math",
- date = "2012/04/23",
- version = 0.1,
+ date = "2013/05/04",
+ version = 0.3,
description = "Unicode math typesetting for LuaLaTeX",
author = "Khaled Hosny, Will Robertson, Philipp Stephani",
licence = "LPPL v1.3+"
})
-local function set_sscale_dimens(fontdata)
- local mc = fontdata.MathConstants
- if mc then
- fontdata.parameters[10] = mc.ScriptPercentScaleDown or 70
- fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown or 50
+if luaotfload and luaotfload.module and luaotfload.module.version < 2 then
+ local function set_sscale_dimens(fontdata)
+ local mc = fontdata.MathConstants
+ if mc then
+ fontdata.parameters[10] = mc.ScriptPercentScaleDown or 70
+ fontdata.parameters[11] = mc.ScriptScriptPercentScaleDown or 50
+ end
end
-end
-luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_math.set_sscale_dimens")
-local function patch_cambria_domh(fontdata)
- local mc = fontdata.MathConstants
- local mh = 2800 / fontdata.units * fontdata.size
- if fontdata.psname == "CambriaMath" and mc then
- if mc.DisplayOperatorMinHeight < mh then
- mc.DisplayOperatorMinHeight = mh
+ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_math.set_sscale_dimens")
+ local function patch_cambria_domh(fontdata)
+ local mc = fontdata.MathConstants
+ if mc and fontdata.psname == "CambriaMath" then
+ -- keeping backward compatibility with luaotfload v1
+ local units_per_em
+ local metadata = fontdata.shared and fontdata.shared.rawdata.metadata
+ if metadata and metadata.units_per_em then
+ units_per_em = metadata.units_per_em
+ elseif fontdata.parameters.units then
+ units_per_em = fontdata.parameters.units
+ elseif fontdata.units then
+ units_per_em = fontdata.units
+ else
+ units_per_em = 1000
+ end
+ local sz = fontdata.parameters.size or fontdata.size
+ local mh = 2800 / units_per_em * sz
+ if mc.DisplayOperatorMinHeight < mh then
+ mc.DisplayOperatorMinHeight = mh
+ end
end
end
+ luatexbase.add_to_callback("luaotfload.patch_font", patch_cambria_domh, "cambria.domh")
end
-luatexbase.add_to_callback("luaotfload.patch_font", patch_cambria_domh, "cambria.domh")
diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
index 31d8fb15087..5071282d3dd 100644
--- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
+++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
@@ -17,7 +17,7 @@
%%
%% This work is "maintained" by Will Robertson.
\ProvidesPackage{unicode-math}
- [2013/03/16 v0.7d Unicode maths in XeLaTeX and LuaLaTeX]
+ [2013/05/04 v0.7e Unicode maths in XeLaTeX and LuaLaTeX]
\usepackage{ifxetex,ifluatex}
\ifxetex
\ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in%