summaryrefslogtreecommitdiff
path: root/src/luaotfload-database.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luaotfload-database.lua')
-rw-r--r--src/luaotfload-database.lua41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 06a3dea..54a0398 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -535,28 +535,28 @@ local load_lua_file = function (path)
end
--- define locals in scope
+local collect_families
local crude_file_lookup
local crude_file_lookup_verbose
local find_closest
local flush_lookup_cache
-local ot_fullinfo
-local t1_fullinfo
-local load_names
+local generate_filedata
+local get_font_filter
+local group_modifiers
local load_lookups
+local load_names
+local order_design_sizes
+local ot_fullinfo
local read_blacklist
local reload_db
-local resolve_name
local resolve_cached
local resolve_fullpath
-local save_names
+local resolve_name
local save_lookups
-local update_names
-local get_font_filter
+local save_names
local set_font_filter
-local generate_filedata
-local collect_families
-local group_modifiers
-local order_design_sizes
+local t1_fullinfo
+local update_names
--- state of the database
local fonts_reloaded = false
@@ -2407,20 +2407,16 @@ end
--doc]]--
-local scan_local_fonts = function ()
+local scan_local_fonts = function (currentnames,
+ targetnames,
+ dry_run)
local n_scanned, n_new = 0, 0
local pwd = lfscurrentdir ()
- local name_index = name_index
report ("both", 1, "db", "Scanning fonts in $PWD (%q) ...", pwd)
- n_scanned, n_new = scan_dir (pwd, name_index, name_index, false, "local")
+ n_scanned, n_new = scan_dir (pwd, currentnames, targetnames, false, "local")
if n_new > 0 then
- name_index.files = generate_filedata (name_index.mappings)
- name_index.families = collect_families (name_index.mappings)
- name_index.families = group_modifiers (name_index.mappings,
- name_index.families)
- name_index.families = order_design_sizes (name_index.families)
- name_index.meta["local"] = true --- prevent saving to disk
+ targetnames.meta["local"] = true --- prevent saving to disk
end
return n_scanned, n_new
@@ -2938,6 +2934,11 @@ local retrieve_namedata = function (currentnames,
n_rawnames = n_rawnames + rawnames
n_newnames = n_newnames + new
+ rawnames, new = scan_local_fonts (currentnames, targetnames, dry_run)
+
+ n_rawnames = n_rawnames + rawnames
+ n_newnames = n_newnames + new
+
return n_rawnames, n_newnames
end