summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-02-07 23:45:04 +0000
committerKarl Berry <karl@freefriends.org>2010-02-07 23:45:04 +0000
commit602b340986f3fac67efcc0363a158aa136453ce1 (patch)
tree6308fc4b3fee55b0b7a62f997e3a79d427e6c964
parent28f8287b52b9e47d5579c5ee9813513f4c7c918c (diff)
luaotfloaf 1.06a (7feb10)
git-svn-id: svn://tug.org/texlive/trunk@16937 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/luatex/luaotfload/News12
-rw-r--r--Master/texmf-dist/doc/luatex/luaotfload/README23
-rw-r--r--Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdfbin178267 -> 178465 bytes
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/Makefile4
-rw-r--r--Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx10
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otc.lua18
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/otfl-font-xtx.lua123
9 files changed, 159 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/News b/Master/texmf-dist/doc/luatex/luaotfload/News
new file mode 100644
index 00000000000..8ecc036b6f0
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/luaotfload/News
@@ -0,0 +1,12 @@
+ History of the luaotfload bundle
+
+2010/12/01, luaotfload v1.06a:
+ * more complete tlig and trep
+ * defaults options changed to "+ccmp;+locl;+rlig;+liga;+clig;+kern;
+ +mark;+mkmk;"
+ * supporting windows absolute path
+
+2009/12/01, luaotfload v1.06:
+ * synchronizing with ConTeXt stable 2009.11.26
+ * adding backward compatibility with LuaTeX 0.40.6
+
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/README b/Master/texmf-dist/doc/luatex/luaotfload/README
index 50fbea7c2c1..5b1f7453334 100644
--- a/Master/texmf-dist/doc/luatex/luaotfload/README
+++ b/Master/texmf-dist/doc/luatex/luaotfload/README
@@ -5,7 +5,8 @@ luaotfload is the adaptation of the ConTeXt OTF loading system for Plain and
LaTeX. It allows to open OTF fonts with almost all features available through
the XeTeX font syntax.
-This package is developped on <http://github.com/mpg/luaotfload>.
+This package is developed on <http://github.com/mpg/luaotfload>, see the 'News'
+file for version history.
Installation
@@ -68,35 +69,35 @@ This work is distributed under the GNU GPLv2 license. Please see COPYING file
for more details about the license.
The files otfl-*.lua are under the GNU GPLv2 license. Their legal notice is
-
+
"
Copyright 2008 PRAGMA ADE / ConTeXt Development Team
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"
-
+
The file luaotfload.dtx and the derived files
luaotfload.pdf
luaotfload.sty
luaotfload.lua
are under the CC0 license. You can find the CC0 license full text at
-
+
http://creativecommons.org/publicdomain/zero/1.0/legalcode
-
+
and a FAQ at
-
+
http://wiki.creativecommons.org/CC0
diff --git a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf
index 0e3aa6ece6e..412013206ea 100644
--- a/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf
+++ b/Master/texmf-dist/doc/luatex/luaotfload/luaotfload.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/luatex/luaotfload/Makefile b/Master/texmf-dist/source/luatex/luaotfload/Makefile
index 336e136dea1..63d389bb1b4 100644
--- a/Master/texmf-dist/source/luatex/luaotfload/Makefile
+++ b/Master/texmf-dist/source/luatex/luaotfload/Makefile
@@ -9,11 +9,11 @@ OTFL = $(wildcard otfl-*.lua)
COMPILED = $(DOC)
UNPACKED = luaotfload.sty luaotfload.lua
GENERATED = $(COMPILED) $(UNPACKED)
-SOURCE = $(DTX) $(OTFL) README Makefile
+SOURCE = $(DTX) $(OTFL) README Makefile News
# Files grouped by installation location
RUNFILES = $(UNPACKED) $(OTFL)
-DOCFILES = $(DOC) README
+DOCFILES = $(DOC) README News
SRCFILES = $(DTX) Makefile
# The following definitions should be equivalent
diff --git a/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx b/Master/texmf-dist/source/luatex/luaotfload/luaotfload.dtx
index c746186018f..090e866db78 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/12/01 v1.06 ConTeXt font loading system}
+\Msg{* Package: luaotfload 2010/02/03 v1.06a ConTeXt font loading system}
\Msg{************************************************************************}
\keepsilent
@@ -100,7 +100,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luaminimalotf.drv}%
- [2009/12/01 v1.06 ConTeXt font loading system]%
+ [2010/02/03 v1.06a ConTeXt font loading system]%
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
@@ -131,7 +131,7 @@ and the derived files
% \GetFileInfo{luaotfload.drv}
%
% \title{The \textsf{luaotfload} package}
-% \date{2009/12/01 v1.06}
+% \date{2010/02/03 v1.06a}
% \author{Elie Roux \\ \texttt{elie.roux@telecom-bretagne.eu}}
%
% \maketitle
@@ -225,7 +225,7 @@ luaotfload = { }
luaotfload.module = {
name = "luaotfload",
version = 1.06,
- date = "2009/12/01",
+ date = "2010/02/03",
description = "ConTeXt font loading system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
@@ -497,7 +497,7 @@ end
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2009/12/01 v1.06 ConTeXt font loading system]
+ [2010/02/03 v1.06a ConTeXt font loading system]
\RequirePackage{luatextra}
\fi
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
index 3058f43adf6..46747dd771d 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.lua
@@ -20,7 +20,7 @@ luaotfload = { }
luaotfload.module = {
name = "luaotfload",
version = 1.06,
- date = "2009/12/01",
+ date = "2010/02/03",
description = "ConTeXt font loading system.",
author = "Elie Roux & Hans Hagen",
copyright = "Elie Roux",
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
index 81ef11df71d..2c791f0cf84 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
@@ -23,7 +23,7 @@
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2009/12/01 v1.06 ConTeXt font loading system]
+ [2010/02/03 v1.06a ConTeXt font loading system]
\RequirePackage{luatextra}
\fi
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otc.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otc.lua
index 1fc1f228930..059748dc5ef 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otc.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-otc.lua
@@ -27,18 +27,22 @@ local extra_lists = {
{
endash = "hyphen hyphen",
emdash = "hyphen hyphen hyphen",
- -- quotedblleft = "quoteleft quoteleft",
- -- quotedblright = "quoteright quoteright",
- -- quotedblleft = "grave grave",
- -- quotedblright = "quotesingle quotesingle",
- -- quotedblbase = "comma comma",
+ quotedblleft = "quoteleft quoteleft",
+ quotedblright = "quoteright quoteright",
+ quotedblleft = "grave grave",
+ quotedblright = "quotesingle quotesingle",
+ quotedblbase = "comma comma",
+ exclamdown = "exclam grave",
+ questiondown = "question grave",
+ guillemotleft = "less less",
+ guillemotright= "greater greater",
},
},
trep = {
{
- -- [0x0022] = 0x201D,
+ [0x0022] = 0x201D,
[0x0027] = 0x2019,
- -- [0x0060] = 0x2018,
+ [0x0060] = 0x2018,
},
},
anum = {
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-xtx.lua b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-xtx.lua
index 8aecae8d920..d5397da3aa3 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-xtx.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/otfl-font-xtx.lua
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['font-xtx'] = {
local texsprint, count = tex.sprint, tex.count
local format, concat, gmatch, match, find, lower = string.format, table.concat, string.gmatch, string.match, string.find, string.lower
local tostring, next = tostring, next
+local lpegmatch = lpeg.match
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
@@ -61,25 +62,124 @@ local list = { }
fonts.define.specify.colonized_default_lookup = "file"
+local function isstyle(s)
+ local style = string.lower(s):split("/")
+ for _,v in ipairs(style) do
+ if v == "b" then
+ list.style = "bold"
+ elseif v == "i" then
+ list.style = "italic"
+ elseif v == "bi" or v == "ib" then
+ list.style = "bolditalic"
+ elseif v:find("^s=") then
+ list.optsize = v:split("=")[2]
+ elseif v == "aat" or v == "icu" or v == "gr" then
+ logs.report("define font", "unsupported font option: %s", v)
+ elseif not v:is_empty() then
+ list.style = v:gsub("[^%a%d]", "")
+ end
+ end
+end
+
+fonts = fonts or { }
+fonts.otf = fonts.otf or { }
+
+local otf = fonts.otf
+
+otf.tables = otf.tables or { }
+
+otf.tables.defaults = {
+ dflt = {
+ "ccmp", "locl", "rlig", "liga", "clig",
+ "kern", "mark", "mkmk",
+ },
+ arab = {
+ "ccmp", "locl", "isol", "fina", "fin2",
+ "fin3", "medi", "med2", "init", "rlig",
+ "calt", "liga", "cswh", "mset", "curs",
+ "kern", "mark", "mkmk",
+ },
+ deva = {
+ "ccmp", "locl", "init", "nukt", "akhn",
+ "rphf", "blwf", "half", "pstf", "vatu",
+ "pres", "blws", "abvs", "psts", "haln",
+ "calt", "blwm", "abvm", "dist", "kern",
+ "mark", "mkmk",
+ },
+ khmr = {
+ "ccmp", "locl", "pref", "blwf", "abvf",
+ "pstf", "pres", "blws", "abvs", "psts",
+ "clig", "calt", "blwm", "abvm", "dist",
+ "kern", "mark", "mkmk",
+ },
+ thai = {
+ "ccmp", "locl", "liga", "kern", "mark",
+ "mkmk",
+ },
+ hang = {
+ "ccmp", "ljmo", "vjmo", "tjmo",
+ },
+}
+
+otf.tables.defaults.beng = otf.tables.defaults.deva
+otf.tables.defaults.guru = otf.tables.defaults.deva
+otf.tables.defaults.gujr = otf.tables.defaults.deva
+otf.tables.defaults.orya = otf.tables.defaults.deva
+otf.tables.defaults.taml = otf.tables.defaults.deva
+otf.tables.defaults.telu = otf.tables.defaults.deva
+otf.tables.defaults.knda = otf.tables.defaults.deva
+otf.tables.defaults.mlym = otf.tables.defaults.deva
+otf.tables.defaults.sinh = otf.tables.defaults.deva
+
+otf.tables.defaults.syrc = otf.tables.defaults.arab
+otf.tables.defaults.mong = otf.tables.defaults.arab
+otf.tables.defaults.nko = otf.tables.defaults.arab
+
+otf.tables.defaults.tibt = otf.tables.defaults.khmr
+
+otf.tables.defaults.lao = otf.tables.defaults.thai
+
+local function parse_script(script)
+ if otf.tables.scripts[script] then
+ local dflt
+ if otf.tables.defaults[script] then
+ dflt = otf.tables.defaults[script]
+ else
+ dflt = otf.tables.defaults["dflt"]
+ end
+ for _,v in next, dflt do
+ list[v] = "yes"
+ end
+ end
+end
+
local function issome () list.lookup = fonts.define.specify.colonized_default_lookup end
local function isfile () list.lookup = 'file' end
local function isname () list.lookup = 'name' end
local function thename(s) list.name = s end
local function issub (v) list.sub = v end
-local function iscrap (s) list.crap = string.lower(s) end
local function istrue (s) list[s] = 'yes' end
-local function isfalse(s) list[s] = 'no' end
-local function iskey (k,v) list[k] = v end
+--KH local function isfalse(s) list[s] = 'no' end
+local function isfalse(s) list[s] = nil end -- see mpg/luaotfload#4
+local function iskey (k,v)
+ if k == "script" then
+ parse_script(v)
+ end
+ list[k] = v
+end
local spaces = lpeg.P(" ")^0
-local namespec = (1-lpeg.S("/:("))^0 -- was: (1-lpeg.S("/: ("))^0
-local crapspec = spaces * lpeg.P("/") * (((1-lpeg.P(":"))^0)/iscrap) * spaces
+-- ER: now accepting names like C:/program files/texlive/2009/...
+local namespec = (lpeg.R("az", "AZ") * lpeg.P(":"))^-1 * (1-lpeg.S("/:("))^1 -- was: (1-lpeg.S("/: ("))^0
+local crapspec = spaces * lpeg.P("/") * (((1-lpeg.P(":"))^0)/isstyle) * spaces
+-- ER: can't understand why the 'file:' thing doesn't work with fontnames starting by c:...
local filename = (lpeg.P("file:")/isfile * (namespec/thename)) + (lpeg.P("[") * lpeg.P(true)/isname * (((1-lpeg.P("]"))^0)/thename) * lpeg.P("]"))
local fontname = (lpeg.P("name:")/isname * (namespec/thename)) + lpeg.P(true)/issome * (namespec/thename)
local sometext = (lpeg.R("az") + lpeg.R("AZ") + lpeg.R("09"))^1
local truevalue = lpeg.P("+") * spaces * (sometext/istrue)
local falsevalue = lpeg.P("-") * spaces * (sometext/isfalse)
-local keyvalue = (lpeg.C(sometext) * spaces * lpeg.P("=") * spaces * lpeg.C(sometext))/iskey
+local someval = (lpeg.S("+-.") + sometext)^1
+local keyvalue = (lpeg.C(sometext) * spaces * lpeg.P("=") * spaces * lpeg.C(someval))/iskey
local somevalue = sometext/istrue
local subvalue = lpeg.P("(") * (lpeg.C(lpeg.P(1-lpeg.S("()"))^1)/issub) * lpeg.P(")") -- for Kim
local option = spaces * (keyvalue + falsevalue + truevalue + somevalue) * spaces
@@ -88,14 +188,21 @@ local pattern = (filename + fontname) * subvalue^0 * crapspec^0 * options^0
function fonts.define.specify.colonized(specification) -- xetex mode
list = { }
- pattern:match(specification.specification)
+ lpegmatch(pattern,specification.specification)
for k, v in next, list do
list[k] = v:is_boolean()
if type(list[a]) == "nil" then
list[k] = v
end
end
- list.crap = nil -- style not supported, maybe some day
+ if list.style then
+ specification.style = list.style
+ list.style = nil
+ end
+ if list.optsize then
+ specification.optsize = list.optsize
+ list.optsize = nil
+ end
if list.name then
specification.name = list.name
list.name = nil