diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/luatex/luaotfload/Makefile | 16 | ||||
-rw-r--r-- | Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx | 114 |
2 files changed, 87 insertions, 43 deletions
diff --git a/Master/texmf-dist/source/luatex/luaotfload/Makefile b/Master/texmf-dist/source/luatex/luaotfload/Makefile index 8c37fdab982..336e136dea1 100644 --- a/Master/texmf-dist/source/luatex/luaotfload/Makefile +++ b/Master/texmf-dist/source/luatex/luaotfload/Makefile @@ -22,10 +22,10 @@ ALL_FILES = $(GENERATED) $(SOURCE) # Installation locations FORMAT = luatex -RUNDIR = $(TEXMF)/tex/$(FORMAT)/$(NAME) -DOCDIR = $(TEXMF)/doc/$(FORMAT)/$(NAME) -SRCDIR = $(TEXMF)/source/$(FORMAT)/$(NAME) -TEXMF = ./texmf +RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME) +DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME) +SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME) +TEXMFROOT = ./texmf CTAN_ZIP = $(NAME).zip TDS_ZIP = $(NAME).tds.zip @@ -62,18 +62,18 @@ define run-install @mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR) endef -$(TDS_ZIP): TEXMF=./tmp-texmf +$(TDS_ZIP): TEXMFROOT=./tmp-texmf $(TDS_ZIP): $(ALL_FILES) @echo "Making TDS-ready archive $@." @$(RM) -- $@ $(run-install) - @cd $(TEXMF) && zip -9 ../$@ -r . >/dev/null - @$(RM) -r -- $(TEXMF) + @cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null + @$(RM) -r -- $(TEXMFROOT) .PHONY: install manifest clean mrproper install: $(ALL_FILES) - @echo "Installing in '$(TEXMF)'." + @echo "Installing in '$(TEXMFROOT)'." $(run-install) manifest: diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx index c6d8742aa6d..ead895561a0 100644 --- a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx +++ b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx @@ -34,7 +34,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: luaotfload 2009/06/11 v1.02 ConTeXt font loading system} +\Msg{* Package: luaotfload 2009/08/10 v1.03 ConTeXt font loading system} \Msg{************************************************************************} \keepsilent @@ -63,7 +63,8 @@ and the derived files \file{luaotfload.sty}{\from{luaotfload.dtx}{package}}% } -% The following hacks are to generate a lua file with lua comments starting by -- instead of %% +% The following hacks are to generate a lua file with lua comments starting by +% -- instead of %% \def\MetaPrefix{-- } @@ -99,7 +100,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luaminimalotf.drv}% - [2009/06/11 v1.02 ConTeXt font loading system]% + [2009/08/10 v1.03 ConTeXt font loading system]% \documentclass{ltxdoc} \EnableCrossrefs \CodelineIndex @@ -130,13 +131,14 @@ and the derived files % \GetFileInfo{luaotfload.drv} % % \title{The \textsf{luaotfload} package} -% \date{2009/06/11 v1.02} +% \date{2009/08/10 v1.03} % \author{Elie Roux \\ \texttt{elie.roux@telecom-bretagne.eu}} % % \maketitle % % \begin{abstract} -% Con\TeX t font loading system, providing the possibility to load OTF fonts with a lot of features, and the Xe\TeX\ font loading syntax. +% Con\TeX t font loading system, providing the possibility to load OTF fonts +% with a lot of features, and the Xe\TeX\ font loading syntax. % \end{abstract} % % \tableofcontents @@ -145,21 +147,41 @@ and the derived files % % \subsection{Introduction} % -% Font management and installation has always been painful with \TeX\ (and even more with \LaTeX ). A lot of files are needed for one font (tfm, pfb, map, fd, vf), and they are limited to 256 characters. But the font world has evolved since, and new standard types of fonts have appeared, like \textsf{truetype} or \textsf{opentype} fonts. These fonts can contain a lot of characters, and have some functionalities (ligatures, old-style numbers, small capitals, etc.). They are everywhere, as the system fonts and most modern text softwares fonts are of this type. Until now the (almost) only way to use them with \TeX\ was to use them with Xe\TeX . -% -% Unlike Xe\TeX , Lua\TeX\ does not provide facilities for these fonts by default, but it provides a way to hook lua code in some points of the \TeX\ algorithm, for instance we can improve the font loading system; this is what we do in this package. -% -%This package is quite low-level, and should be loaded directly in the macro package, like it is in Con\TeX t. Sadly, Plain and \LaTeX\ are frozen and it's even impossible to adapt them to the new engines. +% Font management and installation has always been painful with \TeX\ (and +% even more with \LaTeX ). A lot of files are needed for one font (tfm, pfb, +% map, fd, vf), and they are limited to 256 characters. But the font world has +% evolved since, and new standard types of fonts have appeared, like +% \textsf{truetype} or \textsf{opentype} fonts. These fonts can contain a lot +% of characters, and have some functionalities (ligatures, old-style numbers, +% small capitals, etc.). They are everywhere, as the system fonts and most +% modern text softwares fonts are of this type. Until now the (almost) only +% way to use them with \TeX\ was to use them with Xe\TeX . +% +% Unlike Xe\TeX , Lua\TeX\ does not provide facilities for these fonts by +% default, but it provides a way to hook lua code in some points of the \TeX\ +% algorithm, for instance we can improve the font loading system; this is what +% we do in this package. +% +% This package is quite low-level, and should be loaded directly in the macro +% package, like it is in Con\TeX t. Sadly, Plain and \LaTeX\ are frozen and +% it's even impossible to adapt them to the new engines. % % \subsection{Con\TeX t files needed} % -% This package is a wrapper for several files taken from the Con\TeX t macro package. The philosophy is to let Con\TeX t do all the implementation and update these files from time to time. To do so we did not modify the files taken from Con\TeX t, we only changed their names to prevent name clashes. You can thus update the font system of this package simply by updating the files taken from Con\TeX t, without (theorically) changing the \texttt{.sty} file nor the main \texttt{.lua} file. +% This package is a wrapper for several files taken from the Con\TeX t macro +% package. The philosophy is to let Con\TeX t do all the implementation and +% update these files from time to time. To do so we did not modify the files +% taken from Con\TeX t, we only changed their names to prevent name clashes. +% You can thus update the font system of this package simply by updating the +% files taken from Con\TeX t, without (theorically) changing the \texttt{.sty} +% file nor the main \texttt{.lua} file. % -% The Con\TeX t files are renamed by adding the prefix \texttt{otfl-} to them (\texttt{otfl} as \texttt{OTF L}oad).The files are: +% The Con\TeX t files are renamed by adding the prefix \texttt{otfl-} to them +% (\texttt{otfl} as \texttt{OTF L}oad).The files are: % % \begin{itemize} % \item \texttt{luat-dum.lua} -% \item \texttt{luat-con.lua} +% \item \texttt{data-con.lua} % \item \texttt{node-ini.lua} % \item \texttt{node-inj.lua} % \item \texttt{node-fnt.lua} @@ -177,24 +199,33 @@ and the derived files % \item \texttt{font-otc.lua} % \item \texttt{font-def.lua} % \item \texttt{font-xtx.lua} +% \item \texttt{font-map.lua} % \item \texttt{font-dum.lua} % \end{itemize} % +% \subsection{Troubleshooting} +% +% If you encounter problems with some fonts, please first update to the latest version of this package before reporting a bug, as this package is under active development. +% +% A very common problem is the lack of features for some otf fonts even when specified. It can be related to the fact that some fonts do not provide features for the |dflt| script, which is the default one in this package, so you may have to specify the script in the command line, for example: +% +% |\font\myfont = MyFont.otf:script=latn;+liga;| +% % \section{\texttt{luaotfload.lua}} % % \iffalse %<*lua> % \fi % -% First some usual initializations. +% First some usual initializations. % % \begin{macrocode} luaotfload = { } luaotfload.module = { name = "luaotfload", - version = 1.02, - date = "2009/06/11", + version = 1.03, + date = "2009/08/10", description = "ConTeXt font loading system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", @@ -205,7 +236,9 @@ luatextra.provides_module(luaotfload.module) % \end{macrocode} % -% We load the Con\TeX t files with this function. It automatically adds the \texttt{otfl-} prefix to it, so that we call it with the actual Con\TeX t name. +% We load the Con\TeX t files with this function. It automatically adds the +% \texttt{otfl-} prefix to it, so that we call it with the actual Con\TeX t +% name. % % \begin{macrocode} @@ -221,7 +254,8 @@ end % \end{macrocode} % -% The following functions are made to map Con\TeX t functions to \textsf{luaextra} functions. +% The following functions are made to map Con\TeX t functions to +% \textsf{luaextra} functions. % % \begin{macrocode} @@ -232,7 +266,7 @@ file.extname = fpath.suffix % \end{macrocode} % -% These are small functions that are not already in \textsf{luatextra}. +% These are small functions that are not already in \textsf{luatextra}. % % \begin{macrocode} @@ -294,7 +328,9 @@ end % \end{macrocode} % -% We start loading some lua files. These two are some code not used by Con\TeX t at all that allow other modules to be used, it provides some low-level Con\TeX t functions. +% We start loading some lua files. These two are some code not used by +% Con\TeX t at all that allow other modules to be used, it provides some +% low-level Con\TeX t functions. % % \begin{macrocode} @@ -303,7 +339,7 @@ luaotfload.loadmodule('data-con.lua') -- maybe some day we don't need this one % \end{macrocode} % -% This one is for node support. +% This one is for node support. % % \begin{macrocode} @@ -311,7 +347,13 @@ luaotfload.loadmodule('node-ini.lua') % \end{macrocode} % -% By default Con\TeX t takes some private attributes for internal use. With Plain and \LaTeX\ we can't do so, we use |\newluaattribute|. This functions overrides a function defined in the previous module that returns the number of a private attribute. We allocate new attributes in the \texttt{.sty} file, and this function returns their number. Like this we don't need any private attribute, and this package is compatible with the others. We use the |otfl@| prefix for attributes. +% By default Con\TeX t takes some private attributes for internal use. With +% Plain and \LaTeX\ we can't do so, we use |\newluaattribute|. This +% functions overrides a function defined in the previous module that +% returns the number of a private attribute. We allocate new attributes in +% the \texttt{.sty} file, and this function returns their number. Like this +% we don't need any private attribute, and this package is compatible with +% the others. We use the |otfl@| prefix for attributes. % % \begin{macrocode} @@ -325,7 +367,8 @@ end % \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. +% Some more modules. We don't load neither \texttt{font-enc.lua} nor +% \texttt{font-afm.lua} as it will never be used here. % % \begin{macrocode} @@ -348,7 +391,9 @@ luaotfload.loadmodule('font-otc.lua') % \end{macrocode} % -% \texttt{font-def.lua} calls the function \texttt{callback.register} to register its callbacks. We override it with a dumb function so that it does not register any callback. We will register the callbacks later. +% \texttt{font-def.lua} calls the function \texttt{callback.register} to +% register its callbacks. We override it with a dumb function so that it +% does not register any callback. We will register the callbacks later. % % \begin{macrocode} @@ -362,11 +407,12 @@ do end luaotfload.loadmodule('font-xtx.lua') +luaotfload.loadmodule('font-map.lua') luaotfload.loadmodule('font-dum.lua') % \end{macrocode} % -% This is a small patch that prevents errors in some \LaTeX\ files. +% This is a small patch that prevents errors in some \LaTeX\ files. % % \begin{macrocode} @@ -374,13 +420,11 @@ fonts.enc.known = {} % \end{macrocode} % -% Finally two functions +% Finally two functions % % \begin{macrocode} function luaotfload.register_callbacks() - callback.add('ligaturing', nodes.simple_font_dummy, 'luaotfload.ligaturing') - callback.add('kerning', nodes.simple_font_dummy, 'luaotfload.kerning') callback.add('pre_linebreak_filter', nodes.simple_font_handler, 'luaotfload.pre_linebreak_filter') callback.add('hpack_filter', nodes.simple_font_handler, 'luaotfload.hpack_filter') callback.reset('define_font') @@ -388,8 +432,6 @@ function luaotfload.register_callbacks() end function luaotfload.unregister_callbacks() - callback.remove('ligaturing', 'luaotfload.ligaturing') - callback.remove('kerning', 'luaotfload.kerning') callback.remove('pre_linebreak_filter', 'luaotfload.pre_linebreak_filter') callback.remove('hpack_filter', 'luaotfload.hpack_filter') callback.remove('define_font', 'luaotfload.define_font') @@ -405,7 +447,7 @@ end %<*package> % \fi % -% Classical Plain+\LaTeX\ package initialization. +% Classical Plain+\LaTeX\ package initialization. % % \begin{macrocode} \csname ifluaotfloadloaded\endcsname @@ -416,7 +458,7 @@ end \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luaotfload}% - [2009/06/11 v1.02 ConTeXt font loading system] + [2009/08/10 v1.03 ConTeXt font loading system] \RequirePackage{luatextra} \fi @@ -428,7 +470,8 @@ end % \end{macrocode} % -% The attributes are allocated here. The |otfl@| prefix is added to prevent name collision. +% The attributes are allocated here. The |otfl@| prefix is added to prevent +% name collision. % % \begin{macrocode} @@ -444,7 +487,8 @@ end % \end{macrocode} % -% Two small macros to register or unregister the callbacks. Without the callbacks this package is totally turned off. +% Two small macros to register or unregister the callbacks. Without the +% callbacks this package is totally turned off. % % \begin{macrocode} @@ -458,7 +502,7 @@ end % \end{macrocode} % -% We load the |lua| file, and we turn the package on. +% We load the |lua| file, and we turn the package on. % % \begin{macrocode} |