From 389fb8f80bb8d8fcaa467e3cb35198345bc03867 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 9 May 2013 23:04:10 +0200 Subject: mention man page in NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index df205dc..a432d98 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,7 @@ Change History * Hans adapted the font loader to several of our requests (attribute allocation, custom merged package name etc.) * Auxiliary functions for package authors + * Man page for luaotfload-tool 2013/04/27, luaotfload v1.3: * blacklisting lingoes.ttf (segfaults) -- cgit v1.2.3 From 1c2d453e16c5f5289fa76fb21af4da82f50390a1 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 9 May 2013 23:26:31 +0200 Subject: add glyph fallbacks from Context --- mkglyphlist | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mkglyphlist b/mkglyphlist index 3366c9c..94aac39 100755 --- a/mkglyphlist +++ b/mkglyphlist @@ -20,6 +20,21 @@ local glyphfile = "./glyphlist.txt" local font_age = "./luaotfload-glyphlist.lua" local glyph_source = "http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt" +----------------------------------------------------------------------- +-- fallbacks +----------------------------------------------------------------------- +--- Hans adds a small list of mappings that are not in the original +--- glyph list but seem to be normalizations of some sort. I trust his +--- experience, so I’ll just include them here. Background: +--- http://www.ntg.nl/pipermail/ntg-context/2013/073089.html + +local fallbacks = { + ["SF10000"]=9484, ["SF20000"]=9492, ["SF30000"]=9488, + ["SF40000"]=9496, ["SF50000"]=9532, ["SF60000"]=9516, + ["SF70000"]=9524, ["SF80000"]=9500, ["SF90000"]=9508, + ["afii208"]=8213, +} + ----------------------------------------------------------------------- -- includes ----------------------------------------------------------------------- @@ -73,6 +88,9 @@ local get_glyphs = function (data) print("error: could not parse glyph list") os.exit(-1) end + for name, glyph in next, fallbacks do + res[name] = res[name] or glyph + end return res end -- cgit v1.2.3 From eb522f0f723c5ab94f43c72cce25d9ac6921a8d9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 01:08:31 +0200 Subject: reinstated deprecated paths in file: lookups --- luaotfload-features.lua | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/luaotfload-features.lua b/luaotfload-features.lua index f91aee7..5e8216c 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -32,6 +32,7 @@ local old_feature_list = { } local report = logs.names_report +local stringfind = string.find local stringlower = string.lower local stringgsub = string.gsub local stringis_empty = string.is_empty @@ -215,10 +216,25 @@ local toboolean = function (s) return s end +--- dirty test if a file: request is actually a path: lookup; don’t +--- ask! +local check_garbage = function (_,i, garbage) + if stringfind(garbage, "/") then + report("log", 0, "load", --- ffs use path! + "warning: path in file: lookups is deprecated; ") + report("log", 0, "load", "use bracket syntax instead!") + report("log", 0, "load", + "position: %d; full match: “%s”", + i, garbage) + return true + end + return false +end + local lpegmatch = lpeg.match local P, S, R = lpeg.P, lpeg.S, lpeg.R -local C, Cc, Cf, Cg, Cs, Ct - = lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Cs, lpeg.Ct +local C, Cc, Cf, Cg, Cmt, Cs, Ct + = lpeg.C, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Cmt, lpeg.Cs, lpeg.Ct --- terminals and low-level classes ----------------------------------- --- note we could use the predefined ones from lpeg.patterns @@ -259,9 +275,17 @@ local modifier = slash * (other_modifier --> ignore local modifier_list = Cg(Ct(modifier^0), "modifiers") --- lookups ----------------------------------------------------------- -local fontname = C((1-S"/:(")^1) --- like luatex-fonts +local fontname = C((1-S":(/")^1) --- like luatex-fonts +local unsupported = Cmt((1-S":(")^1, check_garbage) local prefixed = P"name:" * ws * Cg(fontname, "name") - + P"file:" * ws * Cg(fontname, "file") +--- initially we intended file: to emulate the behavior of +--- luatex-fonts, i.e. no paths allowed. after all, we do have XeTeX +--- emulation with the path lookup and it interferes with db lookups. +--- turns out fontspec and other widely used packages rely on file: +--- with paths already, so we’ll add a less strict rule here. anyways, +--- we’ll emit a warning. + + P"file:" * ws * Cg(unsupported, "path") + + P"file:" * ws * Cg(fontname, "file") local unprefixed = Cg(fontname, "anon") local path_lookup = lbrk * Cg(C((1-rbrk)^1), "path") * rbrk -- cgit v1.2.3