summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-08-24 13:48:56 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-08-24 13:48:56 +0200
commitcc18ba7390f931c0dca7df0d775871c7f375d8ba (patch)
tree0711aa2f328d4656ecedafabf421d63377757150
parenta8cacb62596f720cdb333532974ef8764293cd9b (diff)
downloadluaotfload-cc18ba7390f931c0dca7df0d775871c7f375d8ba.tar.gz
[db] keep formats when doing a live db update
-rw-r--r--luaotfload-database.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index d8c934d..2dbc20c 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -810,8 +810,7 @@ resolve = function (_, _, specification) -- the 1st two parameters are used by C
--- but it’s not a table, e.g. it contains an integer.
if not fonts_reloaded then
return reload_db("invalid database; not a table",
- resolve, nil, nil, specification
- )
+ resolve, nil, nil, specification)
end
--- unsucessfully reloaded; bail
return specification.name, false, false
@@ -1004,12 +1003,21 @@ end
--- string -> ('a -> 'a) -> 'a list -> 'a
reload_db = function (why, caller, ...)
- report ("both", 1, "db", "Reload initiated; reason: %q", why)
+ local namedata = names.data
+ local formats = tableconcat (namedata.formats, ",")
+
+ report ("both", 1, "db",
+ "Reload initiated (formats: %s); reason: %q",
+ formats, why)
+
+ set_font_filter (formats)
names.data = update_names (names.data, false, false)
+
if names.data then
fonts_reloaded = true
return caller (...)
end
+
report ("both", 0, "db", "Database update unsuccessful.")
end