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.lua22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 17cb4fd..3cccc17 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -2922,7 +2922,9 @@ end
--- dbobj -> dbobj -> int -> int -> string * bool list
local collect_font_filenames = function ()
- ---
+
+ report ("info", 4, "db", "Scanning the filesystem for font files.")
+
local filenames = { }
tableappend (filenames, collect_font_filenames_texmf ())
tableappend (filenames, collect_font_filenames_system ())
@@ -2932,6 +2934,23 @@ local collect_font_filenames = function ()
return filenames
end
+--[[doc
+
+ count_font_files -- Return the number of files found by
+ collect_font_filenames. This function is exported primarily
+ for use with luaotfload-tool.lua in bisect mode.
+
+--doc]]--
+
+--- unit -> int
+local count_font_files = function ()
+ report ("info", 4, "db", "Counting font files.")
+ if not p_blacklist then
+ read_blacklist ()
+ end
+ return #collect_font_filenames ()
+end
+
--- dbobj -> stats
local collect_statistics = function (mappings)
@@ -3459,6 +3478,7 @@ names.read_blacklist = read_blacklist
names.sanitize_fontname = sanitize_fontname
names.getfilename = resolve_fullpath
names.set_location_precedence = set_location_precedence
+names.count_font_files = count_font_files
--- font cache
names.purge_cache = purge_cache