summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-30 23:30:25 +0000
committerKarl Berry <karl@freefriends.org>2017-01-30 23:30:25 +0000
commitd137b351bcbb9f146bea8faf053d43d66c18fec4 (patch)
tree1db2d5bc2cce6c3f7b911bb0044cd0a0f4cf8023 /Master/texmf-dist/scripts
parent8c1904dc9b7fb713ba362847f752c94a2d29ca35 (diff)
luaotfload (30jan17)
git-svn-id: svn://tug.org/texlive/trunk@43092 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/luaotfload/luaotfload-tool.lua42
-rwxr-xr-xMaster/texmf-dist/scripts/luaotfload/mkglyphlist21
-rwxr-xr-xMaster/texmf-dist/scripts/luaotfload/mkimport25
-rwxr-xr-xMaster/texmf-dist/scripts/luaotfload/mkstatus2
4 files changed, 39 insertions, 51 deletions
diff --git a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua
index bc9e425cb5d..e7df3ce4482 100755
--- a/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua
+++ b/Master/texmf-dist/scripts/luaotfload/luaotfload-tool.lua
@@ -2,15 +2,15 @@
-----------------------------------------------------------------------
-- FILE: luaotfload-tool.lua
-- DESCRIPTION: database functionality
--- REQUIREMENTS: luaotfload 2.7
+-- REQUIREMENTS: luaotfload 2.8
-- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang
-- LICENSE: GPL v2.0
-----------------------------------------------------------------------
luaotfload = luaotfload or { }
-local version = "2.7"
+local version = "2.8"
luaotfload.version = version
-luaotfload.min_luatex_version = { 0, 95, 0 } --- i. e. 0.95.0
+luaotfload.min_luatex_version = { 0, 95, 0 }
luaotfload.self = "luaotfload-tool"
--[[doc--
@@ -64,8 +64,9 @@ do
actual = { major, minor, revno or 0 }
end
- if actual [1] < minimum [1] or actual [2] < minimum [2]
- or actual [3] < minimum [3]
+ if actual [1] < minimum [1]
+ or actual == minimum and actual [2] < minimum [2]
+ or actual == minimum and actual [2] == minimum [2] and actual [3] < minimum [3]
then
texio.write_nl ("term and log",
string.format ("\tFATAL ERROR\n\z
@@ -138,32 +139,22 @@ require "fontloader-basics-gen.lua"
texio.write, texio.write_nl = backup.write, backup.write_nl
utilities = backup.utilities
+pdf = pdf or { } --- for font-tfm
+
require "fontloader-data-con"
require "fontloader-font-ini"
require "fontloader-font-con"
require "fontloader-fonts-enc"
require "fontloader-font-cid"
require "fontloader-font-map"
-require "fontloader-font-tfm"
require "fontloader-font-oti"
require "fontloader-font-otr"
require "fontloader-font-cff"
require "fontloader-font-ttf"
require "fontloader-font-dsp"
require "fontloader-font-oup"
-require "fontloader-font-otl"
-require "fontloader-font-oto"
-------- "fontloader-font-otj"
-------- "fontloader-font-ota"
-------- "fontloader-font-ots"
-------- "fontloader-font-osd"
require "fontloader-font-onr"
-require "fontloader-font-one"
-require "fontloader-font-afk"
-require "fontloader-font-lua"
require "fontloader-font-def"
-require "fontloader-fonts-ext"
-------- "fontloader-font-gbn"
fonts = fonts or { }
local fontsnames = fonts.names or { }
@@ -190,7 +181,7 @@ end
require "alt_getopt"
-loadmodule "log.lua" --- this populates the luaotfload.log.* namespace
+loadmodule "log" --- this populates the luaotfload.log.* namespace
loadmodule "parsers" --- fonts.conf, configuration, and request syntax
loadmodule "configuration" --- configuration file handling
loadmodule "database"
@@ -664,7 +655,7 @@ subfont_by_name = function (lst, askedname, n)
if fonts.names.sanitize_fontname (font.fullname) == askedname then
return font
end
- return subfont_by_name (lst, askedname, n)
+ return subfont_by_name (lst, askedname, n + 1)
end
return false
end
@@ -677,7 +668,7 @@ The font info knows two levels of detail:
returned by readers.loadfont().
--doc]]--
-local show_font_info = function (basename, askedname, detail)
+local show_font_info = function (basename, askedname, detail, subfont)
local filenames = fonts.names.data().files
local index = filenames.base[basename]
local fullname = filenames.full[index]
@@ -687,7 +678,7 @@ local show_font_info = function (basename, askedname, detail)
end
if fullname then
local shortinfo = fonts.handlers.otf.readers.getinfo (fullname, {
- subfont = nil,
+ subfont = subfont,
platformnames = true,
rawfamilynames = true,
})
@@ -710,7 +701,8 @@ local show_font_info = function (basename, askedname, detail)
[[%s is a font collection]], basename)
for subfont = 1, nfonts do
logreport (true, 1, "resolve",
- [[Showing info for font no. %d]], n)
+ [[Showing info for font no. %d]],
+ subfont)
show_info_items(shortinfo[subfont])
if detail == true then
show_full_info(fullname, subfont)
@@ -1182,7 +1174,8 @@ actions.query = function (job)
needle = tmpspec.resolved or tmpspec.name
end
elseif tmpspec.lookup == "file" then
- needle = tmpspec.name
+ needle = tmpspec.name
+ subfont = tmpspec.sub
end
if needle then
@@ -1200,7 +1193,8 @@ actions.query = function (job)
"Resolved file name %q", foundname)
end
if job.show_info then
- show_font_info (foundname, query, job.full_info)
+ logreport (false, 3, "resolve", "Dump extra info.")
+ show_font_info (foundname, query, job.full_info, subfont)
iowrite "\n"
end
else
diff --git a/Master/texmf-dist/scripts/luaotfload/mkglyphlist b/Master/texmf-dist/scripts/luaotfload/mkglyphlist
index f66a686322b..b9d5309d529 100755
--- a/Master/texmf-dist/scripts/luaotfload/mkglyphlist
+++ b/Master/texmf-dist/scripts/luaotfload/mkglyphlist
@@ -18,7 +18,7 @@
-----------------------------------------------------------------------
local glyphfile = "./build/glyphlist.txt"
local font_age = "./build/luaotfload-glyphlist.lua"
-local glyph_source = "http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt"
+local glyph_source = "https://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/glyphlist.txt"
-----------------------------------------------------------------------
-- fallbacks
@@ -67,7 +67,7 @@ local eol = P"\n\r" + P"\r\n" + P"\r" + P"\n"
local space = P" "
local alphanum = R("az", "AZ", "09")
local hexdigit = R("af", "AF", "09")
-local eof_tag = gartenzaun * P"--end"
+local eof_tag = gartenzaun * P"END"
local header_line = gartenzaun * (1-eol)^0 * eol
local codepoint = hexdigit^1
local glyphname = alphanum^1
@@ -140,19 +140,12 @@ local get_raw get_raw = function (retry)
elseif not retry then --- attempt download
print"info: retrieving glyph list from"
print(glyph_source)
- local glyphdata = http.request(glyph_source)
- if glyphdata then
- local fh = io.open(glyphfile, "wb")
- if not fh then
- print (string.format ("error: glyph file (%s) not writable", glyphfile))
- os.exit(-1)
- end
- fh:write(glyphdata)
- fh:close()
- return get_raw(true)
+ local cmd = string.format("wget '%s' -o '%s'", glyph_source, glyphfile)
+ local st = os.execute(string.format("wget '%s' -O '%s'", glyph_source, glyphfile))
+ if st ~= 0 then
+ print(string.format("error: download failed; status: %d, command: %q", st, cmd))
+ os.exit(-1)
end
- print"error: download failed"
- os.exit(-1)
end
print("error: could not obtain glyph data from "..glyphfile)
os.exit(-1)
diff --git a/Master/texmf-dist/scripts/luaotfload/mkimport b/Master/texmf-dist/scripts/luaotfload/mkimport
index 1dc0a291ecb..94e1f0bc5b2 100755
--- a/Master/texmf-dist/scripts/luaotfload/mkimport
+++ b/Master/texmf-dist/scripts/luaotfload/mkimport
@@ -238,11 +238,11 @@ local imports = {
{ name = "font-lua" , ours = "font-lua" , kind = kind_merged },
{ name = "font-map" , ours = "font-map" , kind = kind_merged },
{ name = "font-ocl" , ours = "font-ocl" , kind = kind_merged },
+ { name = "font-otc" , ours = "font-otc" , kind = kind_merged },
{ name = "font-onr" , ours = "font-onr" , kind = kind_merged },
{ name = "font-one" , ours = "font-one" , kind = kind_merged },
{ name = "font-osd" , ours = "font-osd" , kind = kind_merged },
{ name = "font-ota" , ours = "font-ota" , kind = kind_merged },
- { name = "font-otd" , ours = "font-otd" , kind = kind_merged },
{ name = "font-oti" , ours = "font-oti" , kind = kind_merged },
{ name = "font-otj" , ours = "font-otj" , kind = kind_merged },
{ name = "font-otl" , ours = "font-otl" , kind = kind_merged },
@@ -295,7 +295,6 @@ local package = {
--- [19] font-cid.lua
--- [20] font-map.lua
--- [21] luatex-fonts-syn.lua
---- [22] font-tfm.lua
--- [23] font-oti.lua
--- [24] font-otr.lua
--- [25] font-cff.lua
@@ -309,14 +308,16 @@ local package = {
--- [33] font-ots.lua
--- [34] font-osd.lua
--- [35] font-ocl.lua
---- [36] font-onr.lua
---- [37] font-one.lua
---- [38] font-afk.lua
---- [39] font-lua.lua
---- [40] font-def.lua
---- [41] font-xtx.lua
---- [42] luatex-fonts-ext.lua
---- [43] font-gbn.lua
+--- [36] font-otc.lua
+--- [37] font-onr.lua
+--- [38] font-one.lua
+--- [39] font-afk.lua
+--- [40] font-tfm.lua
+--- [41] font-lua.lua
+--- [42] font-def.lua
+--- [43] font-xtx.lua
+--- [44] luatex-fonts-ext.lua
+--- [45] font-gbn.lua
---
--- Of these, nos. 01--11 are provided by the Lualibs. Keeping them
--- around in the Luaotfload fontloader is therefore unnecessary.
@@ -360,8 +361,6 @@ local package = {
"fonts-enc",
"font-cid",
"font-map",
- "fonts-syn",
- "font-tfm",
"font-oti",
"font-otr",
"font-cff",
@@ -375,9 +374,11 @@ local package = {
"font-ots",
"font-osd",
"font-ocl",
+ "font-otc",
"font-onr",
"font-one",
"font-afk",
+ "font-tfm",
"font-lua",
"font-def",
"fonts-ext",
diff --git a/Master/texmf-dist/scripts/luaotfload/mkstatus b/Master/texmf-dist/scripts/luaotfload/mkstatus
index 10f66802003..4fda6a7ff95 100755
--- a/Master/texmf-dist/scripts/luaotfload/mkstatus
+++ b/Master/texmf-dist/scripts/luaotfload/mkstatus
@@ -101,7 +101,6 @@ local names = {
{ miscdir, "fontloader-font-lua.lua", },
{ miscdir, "fontloader-fonts-syn.lua", },
{ miscdir, "fontloader-font-tfm.lua", },
- { miscdir, "fontloader-font-tfm.lua", },
{ miscdir, "fontloader-font-otr.lua", },
{ miscdir, "fontloader-font-cff.lua", },
{ miscdir, "fontloader-font-ttf.lua", },
@@ -114,6 +113,7 @@ local names = {
{ miscdir, "fontloader-font-ots.lua", },
{ miscdir, "fontloader-font-osd.lua", },
{ miscdir, "fontloader-font-ocl.lua", },
+ { miscdir, "fontloader-font-otc.lua", },
--- lua libraries
{ miscdir, "fontloader-languages.lua", },