diff options
author | Karl Berry <karl@freefriends.org> | 2014-07-25 21:06:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-07-25 21:06:48 +0000 |
commit | 53a67c1884d5a4c64a7096aec5990776ccca8e83 (patch) | |
tree | 63088cb700abb8ef88a928a816668301d80fd00f | |
parent | d09a8a920cfe6b9b0e2a9d32a233d9dfcedc0d22 (diff) |
luaotfload (25jul14)
git-svn-id: svn://tug.org/texlive/trunk@34726 c570f23f-e606-0410-a88d-b1316a301751
8 files changed, 151 insertions, 129 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua b/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua index 89f5483b6a3..754f5c7f2e7 100755 --- a/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua +++ b/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua @@ -6,11 +6,11 @@ -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang -- VERSION: 2.5 -- LICENSE: GPL v2.0 --- MODIFIED: 2014-07-16 19:45:40+0200 +-- MODIFIED: 2014-07-24 22:07:35+0200 ----------------------------------------------------------------------- luaotfload = luaotfload or { } -local version = "2.5-1" --- <int: major>.<int: minor>-<int: fixes> +local version = "2.5-2" --- <int: major>.<int: minor>-<int: fixes> luaotfload.version = version luaotfload.self = "luaotfload-tool" diff --git a/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf b/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf Binary files differindex c8559704dc6..b1922afac18 100644 --- a/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/luaotfload-tool.man1.pdf diff --git a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua index 89f5483b6a3..754f5c7f2e7 100755 --- a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua +++ b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua @@ -6,11 +6,11 @@ -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang -- VERSION: 2.5 -- LICENSE: GPL v2.0 --- MODIFIED: 2014-07-16 19:45:40+0200 +-- MODIFIED: 2014-07-24 22:07:35+0200 ----------------------------------------------------------------------- luaotfload = luaotfload or { } -local version = "2.5-1" --- <int: major>.<int: minor>-<int: fixes> +local version = "2.5-2" --- <int: major>.<int: minor>-<int: fixes> luaotfload.version = version luaotfload.self = "luaotfload-tool" diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fontloader.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fontloader.lua index 09582f98018..293a3199678 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fontloader.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-fontloader.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 07/14/14 19:25:59 +-- merge date : 07/18/14 14:12:32 do -- begin closure to overcome local limits and interference @@ -1603,14 +1603,25 @@ local function identical(a,b) end table.identical=identical table.are_equal=are_equal -function table.compact(t) - if t then - for k,v in next,t do - if not next(v) then - t[k]=nil +local function sparse(old,nest,keeptables) + local new={} + for k,v in next,old do + if not (v=="" or v==false) then + if nest and type(v)=="table" then + v=sparse(v,nest) + if keeptables or next(v) then + new[k]=v + end + else + new[k]=v end end end + return new +end +table.sparse=sparse +function table.compact(t) + return sparse(t,true,true) end function table.contains(t,v) if t then @@ -6681,7 +6692,7 @@ local report_otf=logs.reporter("fonts","otf loading") local fonts=fonts local otf=fonts.handlers.otf otf.glists={ "gsub","gpos" } -otf.version=2.758 +otf.version=2.759 otf.cache=containers.define("fonts","otf",otf.version,true) local fontdata=fonts.hashes.identifiers local chardata=characters and characters.data @@ -7236,7 +7247,9 @@ end unicode=cidunicodes[index] end if unicode and descriptions[unicode] then - report_otf("preventing glyph %a at index %H to overload unicode %U",name or "noname",index,unicode) + if trace_private then + report_otf("preventing glyph %a at index %H to overload unicode %U",name or "noname",index,unicode) + end unicode=-1 end if not unicode or unicode==-1 then @@ -7889,12 +7902,12 @@ actions["reorganize lookups"]=function(data,filename,raw) local fore=glyphs.fore if fore and fore~="" then fore=s_uncover(splitter,s_u_cache,fore) - rule.before=s_hashed(fore,s_h_cache) + rule.after=s_hashed(fore,s_h_cache) end local back=glyphs.back if back then back=s_uncover(splitter,s_u_cache,back) - rule.after=s_hashed(back,s_h_cache) + rule.before=s_hashed(back,s_h_cache) end local names=glyphs.names if names then @@ -13052,27 +13065,6 @@ local function unpackdata(data) rule.replacements=tv end end - local fore=rule.fore - if fore then - local tv=tables[fore] - if tv then - rule.fore=tv - end - end - local back=rule.back - if back then - local tv=tables[back] - if tv then - rule.back=tv - end - end - local names=rule.names - if names then - local tv=tables[names] - if tv then - rule.names=tv - end - end local lookups=rule.lookups if lookups then local tv=tables[lookups] diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua index 0d81abbfa4e..773a3cfa180 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua @@ -4,7 +4,7 @@ -- REQUIREMENTS: luatex v.0.79 or later; packages lualibs, luatexbase -- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang -- VERSION: same as Luaotfload --- MODIFIED: 2014-07-16 19:48:30+0200 +-- MODIFIED: 2014-07-24 22:08:34+0200 ----------------------------------------------------------------------- -- --- Note: @@ -48,7 +48,7 @@ local initial_log_level = 0 luaotfload = luaotfload or { } local luaotfload = luaotfload luaotfload.log = luaotfload.log or { } -luaotfload.version = "2.5-1" -- FIXME version belongs in common init +luaotfload.version = "2.5-2" -- FIXME version belongs in common init luaotfload.module = { name = "luaotfload-main", diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua index 3eeb614a202..3a4faea9b56 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-parsers.lua @@ -145,21 +145,21 @@ local xml_attr_list = Cf(Ct"" * xml_attr^1, rawset) --doc]]-- --- string -> bool -> lpeg_t local scan_node = function (tag) - --- Node attributes go into a table with the index “attributes” - --- (relevant for “prefix="xdg"” and the likes). - local p_tag = P(tag) - local with_attributes = P"<" * p_tag - * Cg(xml_attr_list, "attributes")^-1 - * xmlws^-1 - * P">" - local plain = P"<" * p_tag * xmlws^-1 * P">" - local node_start = plain + with_attributes - local node_stop = P"</" * p_tag * xmlws^-1 * P">" - --- there is no nesting, the earth is flat ... - local node = node_start - * Cc(tag) * C(comment + (1 - node_stop)^1) - * node_stop - return Ct(node) -- returns {string, string [, attributes = { key = val }] } + --- Node attributes go into a table with the index “attributes” + --- (relevant for “prefix="xdg"” and the likes). + local p_tag = P(tag) + local with_attributes = P"<" * p_tag + * Cg(xml_attr_list, "attributes")^-1 + * xmlws^-1 + * P">" + local plain = P"<" * p_tag * xmlws^-1 * P">" + local node_start = plain + with_attributes + local node_stop = P"</" * p_tag * xmlws^-1 * P">" + --- there is no nesting, the earth is flat ... + local node = node_start + * Cc(tag) * C(comment + (1 - node_stop)^1) + * node_stop + return Ct(node) -- returns {string, string [, attributes = { key = val }] } end --[[doc-- @@ -217,20 +217,35 @@ local conf_filter = function (path) end --[[doc-- - read_fonts_conf_indeed() is called with seven arguments; the - latter three are tables that represent the state and are - always returned. + + read_fonts_conf_indeed() -- Scan paths included from fontconfig + configuration files recursively. Called with eight arguments. The first four are + · the path to the file · the expanded $HOME · the expanded $XDG_CONFIG_HOME · the expanded $XDG_DATA_HOME + + determining the path to be checked. Another three arguments are + tables that represent the state of the current job as lists of + strings; these are always returned. Finally a reference to the + find_files function is passed. + --doc]]-- ---- string -> string -> string -> tab -> tab -> (tab * tab * tab) + +--- string -> string -> string -> string +--- -> string list -> string list -> string list +--- -> (string -> fun option -> string list) +--- -> tab * tab * tab local read_fonts_conf_indeed -read_fonts_conf_indeed = function (start, home, xdg_config_home, +read_fonts_conf_indeed = function (start, + home, + xdg_config_home, xdg_data_home, - acc, done, dirs_done, + acc, + done, + dirs_done, find_files) local paths = fonts_conf_scanner(start) @@ -267,40 +282,50 @@ read_fonts_conf_indeed = function (start, home, xdg_config_home, path = filejoin(xdg_config_home, path) end --- here the path can be four things: a directory or a file, - --- in absolute or relative path. + --- an absolute or relative path. if stringsub(path, 1, 1) == "~" then path = filejoin(home, stringsub(path, 2)) elseif --- if the path is relative, we make it absolute not ( lfsisfile(path) or lfsisdir(path) ) - then + then path = filejoin(filedirname(start), path) - end - if lfsisfile(path) - and kpsereadable_file(path) - and not done[path] - then - --- we exclude path with texmf in them, as they should - --- be found otherwise - acc = read_fonts_conf_indeed( - path, home, xdg_config_home, xdg_data_home, - acc, done, dirs_done) - elseif lfsisdir(path) then --- arrow code ahead - local config_files = find_files (path, conf_filter) - for _, filename in next, config_files do - if not done[filename] then - acc = read_fonts_conf_indeed( - filename, home, xdg_config_home, xdg_data_home, - acc, done, dirs_done) - end - end - end --- match “kind” - end --- iterate paths end + if lfsisfile(path) + and kpsereadable_file(path) + and not done[path] + then + --- we exclude path with texmf in them, as they should + --- be found otherwise + acc = read_fonts_conf_indeed(path, + home, + xdg_config_home, + xdg_data_home, + acc, + done, + dirs_done, + find_files) + elseif lfsisdir(path) then --- arrow code ahead + local config_files = find_files (path, conf_filter) + for _, filename in next, config_files do + if not done[filename] then + acc = read_fonts_conf_indeed(filename, + home, + xdg_config_home, + xdg_data_home, + acc, + done, + dirs_done, + find_files) + end + end + end --- match “kind” + end --- iterate paths + end - --inspect(acc) - --inspect(done) - return acc, done, dirs_done - end --- read_fonts_conf_indeed() + --inspect(acc) + --inspect(done) + return acc, done, dirs_done +end --- read_fonts_conf_indeed() --[[doc-- read_fonts_conf() sets up an accumulator and two sets @@ -325,11 +350,14 @@ local read_fonts_conf = function (path_list, find_files) local done = { } ---> set: files inspected local dirs_done = { } ---> set: dirs in list for i=1, #path_list do --- we keep the state between files - acc, done, dirs_done = read_fonts_conf_indeed( - path_list[i], home, xdg_config_home, - xdg_data_home, - acc, done, dirs_done, - find_files) + acc, done, dirs_done = read_fonts_conf_indeed(path_list[i], + home, + xdg_config_home, + xdg_data_home, + acc, + done, + dirs_done, + find_files) end return acc end @@ -424,14 +452,14 @@ parsers.splitcomma = splitcomma local handle_normal_option = function (key, val) - val = stringlower(val) - --- the former “toboolean()” handler - if val == "true" then - val = true - elseif val == "false" then - val = false - end - return key, val + val = stringlower(val) + --- the former “toboolean()” handler + if val == "true" then + val = true + elseif val == "false" then + val = false + end + return key, val end --[[doc-- @@ -442,18 +470,18 @@ end --doc]]-- local handle_xetex_option = function (key, val) - val = stringlower(val) - local numeric = tonumber(val) --- decimal only; keeps colors intact - if numeric then --- ugh - if mathceil(numeric) == numeric then -- integer, possible index - val = tostring(numeric + 1) - end - elseif val == "true" then - val = true - elseif val == "false" then - val = false + val = stringlower(val) + local numeric = tonumber(val) --- decimal only; keeps colors intact + if numeric then --- ugh + if mathceil(numeric) == numeric then -- integer, possible index + val = tostring(numeric + 1) end - return key, val + elseif val == "true" then + val = true + elseif val == "false" then + val = false + end + return key, val end --[[doc-- @@ -468,8 +496,8 @@ end --doc]]-- local handle_invalid_option = function (opt) - logreport("log", 0, "load", "font option %q unknown.", opt) - return "", false + logreport("log", 0, "load", "font option %q unknown.", opt) + return "", false end --[[doc-- @@ -481,16 +509,16 @@ end --doc]]-- local check_garbage = function (_,i, garbage) - if stringfind(garbage, "/") then - logreport("log", 0, "load", --- ffs use path! - "warning: path in file: lookups is deprecated; ") - logreport("log", 0, "load", "use bracket syntax instead!") - logreport("log", 0, "load", - "position: %d; full match: %q", - i, garbage) - return true - end - return false + if stringfind(garbage, "/") then + logreport("log", 0, "load", --- ffs use path! + "warning: path in file: lookups is deprecated; ") + logreport("log", 0, "load", "use bracket syntax instead!") + logreport("log", 0, "load", + "position: %d; full match: %q", + i, garbage) + return true + end + return false end local featuresep = comma + semicolon @@ -620,9 +648,11 @@ local maybe_cast = function (var) end return tonumber (var) or var end + local escape = function (chr, repl) return (backslash * P(chr) / (repl or chr)) end + local valid_escapes = escape "\"" + escape "\\" + escape ("n", "\n") @@ -698,4 +728,4 @@ local config = Ct (ini_sections) luaotfload.parsers.config = config --- vim:ft=lua:tw=71:et:sts=4:ts=8 +-- vim:ft=lua:tw=71:et:sw=2:sts=4:ts=8 diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua index 4fc54b2dcec..a4e7b5a9273 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-status.lua @@ -3,11 +3,11 @@ return { { "mkstatus", "38dd7ee3f5b372550e9d5e47466ac6c4" }, { "mkglyphlist", "62bc2c915a0fc936f9249deb0eddcaf3" }, { "mkcharacters", "ec694a87f77067912eb73402ec99040d" }, - { "luaotfload-tool.lua", "9624861e9c8127a1d518c4a924f2af87" }, - { "luaotfload-parsers.lua", "3dd1cb4175729c2f21dad158db4c633f" }, + { "luaotfload-tool.lua", "e4acb2997e759be3579c080570fbe7a1" }, + { "luaotfload-parsers.lua", "cc86ac664ce5aedd81218e59b7180e83" }, { "luaotfload-override.lua", "e6f67a268fa9362d5ebc5cbecad1a900" }, - { "luaotfload-fontloader.lua", "e1eaddea90c7ae93d8babb2e6ff7a687" }, - { "luaotfload-main.lua", "9fb22eef3cfd92922a688fa0ca2c7d27" }, + { "luaotfload-fontloader.lua", "c359b80d2439037780f6242b3a42898e" }, + { "luaotfload-main.lua", "c7abf9c508d5b721ddeb16f3889c5851" }, { "luaotfload-log.lua", "1f8aee13a8b8a7a20cd8b03285ab425a" }, { "luaotfload-loaders.lua", "c364151f603514433fa3128939825d16" }, { "luaotfload-letterspace.lua", "06cfb1e742d496b99c8980fdfd3f29f4" }, @@ -29,7 +29,7 @@ return { }, ["notes"]={ ["committer"]="Philipp Gesang <phg42.2a@gmail.com>", - ["revision"]="95c6d7f9eefcac7a3fd042917df15166935d690d", - ["timestamp"]="2014-07-16 20:03:11 +0200", + ["revision"]="04dc6c632f7bc85b48d12af695392fb5e4d0faef", + ["timestamp"]="2014-07-24 22:09:47 +0200", }, }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty index f09193ba5d6..4ebe3cb243d 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload.sty @@ -40,7 +40,7 @@ \ProvidesPackage{luaotfload}% %% FIXME The date is meaningless, we need to find a way to %% use the git revision instead. - [2014/07/16 v2.5-1 OpenType layout system] + [2014/07/24 v2.5-2 OpenType layout system] \RequirePackage{luatexbase} \fi \RequireLuaModule{luaotfload-main} |