diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-08 00:48:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-08 00:48:36 +0000 |
commit | bc4237aa7d632dca64332e75d8853f642523cb9d (patch) | |
tree | 8fb472e99bf7d4d1f591796f7ad6d7e7aec3c672 /Master/texmf-dist/source/luatex/luaotfload | |
parent | 382d08439593ce35f62e6f2d132c13575a690e5b (diff) |
luaotfload 1.10 (7jun10)
git-svn-id: svn://tug.org/texlive/trunk@18808 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex/luaotfload')
-rw-r--r-- | Master/texmf-dist/source/luatex/luaotfload/Makefile | 18 | ||||
-rw-r--r-- | Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx | 83 |
2 files changed, 73 insertions, 28 deletions
diff --git a/Master/texmf-dist/source/luatex/luaotfload/Makefile b/Master/texmf-dist/source/luatex/luaotfload/Makefile index 2f38501ec9c..0dbcb178512 100644 --- a/Master/texmf-dist/source/luatex/luaotfload/Makefile +++ b/Master/texmf-dist/source/luatex/luaotfload/Makefile @@ -15,6 +15,8 @@ SOURCE = $(DTX) $(OTFL) README Makefile NEWS $(SCRIPT) # test files TESTDIR = tests TESTFILES = $(wildcard $(TESTDIR)/*.tex) +TESTFILE_SYS = $(TESTDIR)/systemfonts.tex $(TESTDIR)/fontconfig_conf_reading.tex +TESTFILES_TL = $(filter-out $(TESTFILE_SYS), $(TESTFILES)) # Files grouped by installation location SCRIPTFILES = $(SCRIPT) @@ -84,12 +86,18 @@ install: $(ALL_FILES) @echo "Installing in '$(TEXMFROOT)'." $(run-install) -check: $(RUNFILES) $(TESTFILES) - @for f in $(TESTFILES); do \ +check: $(RUNFILES) $(TESTFILES_TL) + @for f in $(TESTFILES_TL); do \ echo "check: luatex $$f"; \ - luatex --interaction=batchmode $$f > /dev/null || exit $$?; \ + luatex --interaction=batchmode --output-directory $(TESTDIR) $$f \ + > /dev/null || exit $$?; \ done +check-all: $(TESTFILE_SYS) check + @echo "check: luatex $<" + @luatex --interaction=batchmode --output-directory $(TESTDIR) $< \ + >/dev/null + manifest: @echo "Source files:" @for f in $(SOURCE); do echo $$f; done @@ -98,8 +106,8 @@ manifest: @for f in $(GENERATED); do echo $$f; done clean: - @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out + @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.out $(TESTDIR)/*.log mrproper: clean - @$(RM) -- $(GENERATED) $(ZIPS) + @$(RM) -- $(GENERATED) $(ZIPS) $(TESTDIR)/*.pdf diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx index 975680b8612..874843b62fc 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/05/30 v1.09 ConTeXt font loading system} +\Msg{* Package: luaotfload 2010/06/07 v1.10 ConTeXt font loading system} \Msg{************************************************************************} \keepsilent @@ -102,7 +102,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luaotfload.drv}% - [2010/05/30 v1.09 ConTeXt font loading system]% + [2010/06/07 v1.10 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/05/30 v1.09} +% \date{2010/06/07 v1.10} % \author{ Elie Roux\footnote{\texttt{elie.roux@telecom-bretagne.eu}} % \and Khaled Hosny\footnote{\texttt{khaledhosny@eglug.org}}} % @@ -311,25 +311,23 @@ and the derived files % to keep track of fonts available to \LuaTeX. Using this database, fonts can % be loaded by font name as well as filename. % -% This font database must be maintained as you add (and remove) fonts to your -% system. To update the database, run the script |mkluatexfontdb.lua| that is -% included with this package. If you have not run it before, it may take quite -% some time to process every font on your computer. Subsequent runs to update -% the database will be quite fast, however. -% -% In \TeX~Live~2010, there will be a button in the \TeX~Live package manager -% to run |mkluatexfontdb.lua|. +% This font database is maintained automatically as you add and remove fonts +% to/from your system. To update the database manually, run the script +% |mkluatexfontdb| that is included with this package. If you have not run it +% before, it may take quite some time to process every font on your computer. +% This is particularly noticeable if it occurs during a typesetting run. +% Subsequent runs to update the database will be quite fast, however. % % The script will parse standard places for fonts in your system to build the -% font database. On Windows and Linus, it will use |fc-list| to find the -% fonts; on Mac~OS~X, it will search in the standard font locations -% |~/Library/Fonts|, |/Library/Fonts|, |/System/Library/Fonts|, and -% |/Network/Library/Fonts|, +% font database. Linux, it will use |fontconfig| to find the font locations; +% on Windows and Mac~OS~X, it will search in the standard font locations, +% |%WINDIR%\Fonts| in Windows and |~/Library/Fonts|, |/Library/Fonts|, +% |/System/Library/Fonts|, and |/Network/Library/Fonts| in Mac~OS~X. % -% If you do not wish the script to locate fonts automatically but would rather -% specify the exact locations in which to find your fonts, set the |OSFONTDIR| -% environment variable instead. When this variable is set, the script will -% only search in those directories. +% If you do not wish the script to search the standard font locations by +% default but would rather specify the exact locations in which to find your +% fonts, set the |OSFONTDIR| environment variable instead. When this variable +% is set, the script will only search in those directories. % % |mkluatexfontdb.lua --help| provides a brief summary of the functionality of % the script and includes some advanced options that we have not mentioned @@ -413,8 +411,8 @@ module('luaotfload', package.seeall) luaotfload.module = { name = "luaotfload", - version = 1.09, - date = "2010/05/30", + version = 1.10, + date = "2010/06/07", description = "ConTeXt font loading system.", author = "Elie Roux & Hans Hagen", copyright = "Elie Roux", @@ -459,6 +457,8 @@ end % \end{macrocode} % +% \subsection{Module loading} +% % We load the \ConTeXt\ files with this function. It automatically adds the % \texttt{otfl-} prefix to it, so that we call it with the actual \ConTeXt\ % name. @@ -556,6 +556,42 @@ luaotfload.loadmodule('font-clr.lua') % \end{macrocode} % +% \subsection{Emulating font dimensions} +% +% And here 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.) +% +% Falls back to measuring the glyph if the font doesn't contain the +% necessary information. +% 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 + else + if fontdata.characters[string.byte("X")] then + capheight = fontdata.characters[string.byte("X")].height + else + capheight = otfdata.metadata.ascent/units*size + end + end + fontdata.parameters[8] = capheight + end + return fontdata +end +% \end{macrocode} +% +% \subsection{\ConTeXt\ override} +% % Here we override some defaults set in \ConTeXt\ code. % % \begin{macrocode} @@ -577,7 +613,7 @@ function luaotfload.register_callbacks() 'luaotfload.hpack_filter') luatexbase.reset_callback('define_font') luatexbase.add_to_callback('define_font', - fonts.define.read, + def_font, 'luaotfload.define_font', 1) luatexbase.add_to_callback('find_vf_file', fonts.vf.find, @@ -595,6 +631,7 @@ function luaotfload.unregister_callbacks() 'luaotfload.find_vf_file') end % \end{macrocode} +% % \iffalse %</lua> % \fi @@ -616,7 +653,7 @@ end \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luaotfload}% - [2010/05/30 v1.09 ConTeXt font loading system] + [2010/06/07 v1.10 ConTeXt font loading system] \RequirePackage{luatextra} \fi |