diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-06-15 20:51:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 20:51:12 +0200 |
commit | b43ad03773991d9e227956bc55383e0b2bf0af36 (patch) | |
tree | f42d2df70f00fc0b7ae5753069ad645079c07f21 /src/luaotfload-database.lua | |
parent | 36cc5c9c567e24916f254203fc362bf124e26d02 (diff) | |
parent | fdd5fb7042e29050341dd8462a69c13387d4e67b (diff) | |
download | luaotfload-b43ad03773991d9e227956bc55383e0b2bf0af36.tar.gz |
Merge pull request #365 from phi-gamma/master
fix dynamic db initialization
Diffstat (limited to 'src/luaotfload-database.lua')
-rw-r--r-- | src/luaotfload-database.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 7495ff2..3688c3a 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -416,10 +416,8 @@ mtx-fonts has in names.tma: local initialize_namedata = function (formats, created) local now = os.date "%Y-%m-%d %H:%M:%S" --- i. e. "%F %T" on POSIX systems return { - --families = { }, status = { }, -- was: status; map abspath -> mapping mappings = { }, -- TODO: check if still necessary after rewrite - names = { }, files = { }, -- created later meta = { created = created or now, @@ -526,7 +524,8 @@ load_names = function (dry_run, no_rebuild) names_version, db_version) if not fonts_reloaded then logreport ("both", 0, "db", [[Force rebuild.]]) - data = update_names ({ }, true, false) + data = update_names (initialize_namedata (get_font_filter ()), + true, false) if not data then logreport ("both", 0, "db", "Database creation unsuccessful.") @@ -3193,7 +3192,7 @@ update_names = function (currentnames, force, dry_run) if force then currentnames = initialize_namedata (get_font_filter ()) else - if not currentnames then + if not currentnames or not next (currentnames) then currentnames = load_names (dry_run) end if currentnames.meta.version ~= names.version then @@ -3553,7 +3552,7 @@ return { fonts.definers = fonts.definers or { resolvers = { } } names.blacklist = blacklist - names.version = 2.8 + names.version = 2.9 names.data = nil --- contains the loaded database names.lookups = nil --- contains the lookup cache |