summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex/luaotfload
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-20 21:35:33 +0000
committerKarl Berry <karl@freefriends.org>2010-06-20 21:35:33 +0000
commita262478df24d895c9ec6e33766d70ef3671fc097 (patch)
tree4aa64d676402332c34f40746304456c7bd9b16f2 /Master/texmf-dist/source/luatex/luaotfload
parent0bfa62a5a154a4375347eafd93488b528858ffc9 (diff)
luaotfload 1.12 (18jun10)
git-svn-id: svn://tug.org/texlive/trunk@19078 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex/luaotfload')
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx93
1 files changed, 58 insertions, 35 deletions
diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
index 12aae2acdd2..ca3e2e88926 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
+++ b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
@@ -35,7 +35,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luaotfload 2010/06/09 v1.11 ConTeXt font loading system}
+\Msg{* Package: luaotfload 2010/06/14 v1.12 ConTeXt font loading system}
\Msg{************************************************************************}
\keepsilent
@@ -102,7 +102,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luaotfload.drv}%
- [2010/06/09 v1.11 ConTeXt font loading system]%
+ [2010/06/14 v1.12 ConTeXt font loading system]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,mdwlist,fancyvrb}
\usepackage[colorlinks=true]{hyperref}
@@ -140,7 +140,7 @@ and the derived files
% \GetFileInfo{luaotfload.drv}
%
% \title{The \textsf{luaotfload} package}
-% \date{2010/06/09 v1.11}
+% \date{2010/06/14 v1.12}
% \author{ Elie Roux\footnote{\texttt{elie.roux@telecom-bretagne.eu}}
% \and Khaled Hosny\footnote{\texttt{khaledhosny@eglug.org}}}
%
@@ -350,9 +350,7 @@ and the derived files
% \begin{itemize*}
% \item \texttt{luat-dum.lua}
% \item \texttt{data-con.lua}
-% \item \texttt{node-ini.lua}
% \item \texttt{node-inj.lua}
-% \item \texttt{node-fnt.lua}
% \item \texttt{node-dum.lua}
% \item \texttt{font-ini.lua}
% \item \texttt{font-tfm.lua}
@@ -411,8 +409,8 @@ module('luaotfload', package.seeall)
luaotfload.module = {
name = "luaotfload",
- version = 1.11,
- date = "2010/06/09",
+ version = 1.12,
+ date = "2010/06/14",
description = "ConTeXt font loading system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
@@ -490,11 +488,22 @@ luaotfload.loadmodule('data-con.lua') -- maybe some day we don't need this one
% \end{macrocode}
%
-% This one is for node support.
+% A hack to remove a warning from \texttt{node-dum.lua} as it is \ConTeXt\
+% specific.
+%
+% \begin{macrocode}
+
+tex.attribute[0] = 0
+
+% \end{macrocode}
+%
+% Node support modules.
%
% \begin{macrocode}
-luaotfload.loadmodule('node-ini.lua')
+luaotfload.loadmodule('font-ini.lua')
+luaotfload.loadmodule('node-dum.lua')
+luaotfload.loadmodule('node-inj.lua')
% \end{macrocode}
%
@@ -517,30 +526,14 @@ end
% \end{macrocode}
%
-% A hack to remove a warning from \texttt{node-fnt.lua} as it is \ConTeXt\
-% specific.
-%
-% \begin{macrocode}
-
-tex.attribute[0] = 0
-
-% \end{macrocode}
-%
-% Some more modules. We don't load neither \texttt{font-enc.lua} nor
-% \texttt{font-afm.lua} as it will never be used here.
+% Font handling modules.
%
% \begin{macrocode}
-luaotfload.loadmodule('node-res.lua')
-luaotfload.loadmodule('node-inj.lua')
-luaotfload.loadmodule('node-fnt.lua')
-luaotfload.loadmodule('node-dum.lua')
-
-luaotfload.loadmodule('font-ini.lua')
luaotfload.loadmodule('font-tfm.lua')
luaotfload.loadmodule('font-cid.lua')
-luaotfload.loadmodule('font-map.lua')
luaotfload.loadmodule('font-ott.lua')
+luaotfload.loadmodule('font-map.lua')
luaotfload.loadmodule('font-otf.lua')
luaotfload.loadmodule('font-otd.lua')
luaotfload.loadmodule('font-oti.lua')
@@ -551,14 +544,30 @@ luaotfload.loadmodule('font-otc.lua')
luaotfload.loadmodule('font-def.lua')
luaotfload.loadmodule('font-xtx.lua')
luaotfload.loadmodule('font-dum.lua')
+
+% \end{macrocode}
+%
+% \textsf{luaotfload} specific modules.
+%
+% \begin{macrocode}
+
luaotfload.loadmodule('font-nms.lua')
luaotfload.loadmodule('font-clr.lua')
% \end{macrocode}
%
-% \subsection{Emulating font dimensions}
+% \subsection{Post-processing TFM table}
+%
+% Here we do some final touches to the loaded TFM table before passing it
+% to the \TeX\ end.
+%
+% \begin{macrocode}
+local function def_font(...)
+ local fontdata = fonts.define.read(...)
+ if type(fontdata) == "table" and fontdata.shared then
+% \end{macrocode}
%
-% And here add some code to emulate \XeTeX's \cs{fontdimen8},
+% First, we add some code to emulate \XeTeX's \cs{fontdimen8},
% which stores the caps-height of the font. (Cf.\ \cs{fontdimen5} which
% stores the x-height.)
%
@@ -567,24 +576,38 @@ luaotfload.loadmodule('font-clr.lua')
% This needs to be extended for fonts that don't contain an `X'.
%
% \begin{macrocode}
-local function def_font(...)
- local fontdata = fonts.define.read(...)
- if type(fontdata) == "table" and fontdata.shared then
local capheight
local units = fontdata.units
local size = fontdata.size
local otfdata = fontdata.shared.otfdata
if otfdata.pfminfo.os2_capheight > 0 then
- capheight = otfdata.pfminfo.os2_capheight/units*size
+ capheight = otfdata.pfminfo.os2_capheight / units * size
else
if fontdata.characters[string.byte("X")] then
capheight = fontdata.characters[string.byte("X")].height
else
- capheight = otfdata.metadata.ascent/units*size
+ capheight = otfdata.metadata.ascent / units * size
end
end
fontdata.parameters[8] = capheight
+% \end{macrocode}
+%
+% Then we populate \texttt{MathConstants} table, which is required for
+% OpenType math.
+%
+% \begin{macrocode}
+ if otfdata.metadata.math then
+ for k,v in next, otfdata.metadata.math do
+ if k == "RadicalDegreeBottomRaisePercent" then
+ -- this is a percent
+ fontdata.MathConstants[k] = v
+ else
+ fontdata.MathConstants[k] = v / units * size
+ end
+ end
+ end
+
end
return fontdata
end
@@ -653,7 +676,7 @@ end
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2010/06/09 v1.11 ConTeXt font loading system]
+ [2010/06/14 v1.12 ConTeXt font loading system]
\RequirePackage{luatextra}
\fi