diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-04 23:44:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-04 23:44:02 +0000 |
commit | f3b41bfd3b9b1173b4c132544c708df9cefe0782 (patch) | |
tree | 416e3b9c373d04da68c284e2319b38565dff76d3 /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua | |
parent | a1fe712ff99988a2935a9c903b7880c52080d62b (diff) |
luaotfload (4jan14)
git-svn-id: svn://tug.org/texlive/trunk@32575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua index b47fc8b1f58..9d7d9121d4c 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua @@ -83,7 +83,7 @@ local tableconcat = table.concat local tablesort = table.sort local utf8gsub = unicode.utf8.gsub local utf8lower = unicode.utf8.lower -local utf8length = unicode.utf8.length +local utf8len = unicode.utf8.len local zlibcompress = zlib.compress --- these come from Lualibs/Context @@ -574,7 +574,16 @@ load_names = function (dry_run) report ("info", 3, "db", "Loading took %0.f ms.", 1000 * (osgettimeofday () - starttime)) - local db_version, nms_version = data.meta.version, names.version + local db_version, nms_version + if data.meta then + db_version = data.meta.version + else + --- Compatibility branch; the version info used to be + --- stored in the table root which is why updating from + --- an earlier index version broke. + db_version = data.version or -42 --- invalid + end + nms_version = names.version if db_version ~= nms_version then report ("both", 0, "db", [[Version mismatch; expected %4.3f, got %4.3f.]], @@ -2118,7 +2127,7 @@ end local truncate_string = function (str, restrict) local tw = luaotfloadconfig.termwidth local wd = tw - restrict - local len = utf8length (str) + local len = utf8len (str) if wd - len < 0 then --- combined length exceeds terminal, str = ".." .. stringsub(str, len - wd + 2) |