summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx')
-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