summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
diff options
context:
space:
mode:
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r--otfl-font-nms.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 3477051..73a45c9 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -733,6 +733,19 @@ local function save_names(fontnames)
table.serialize(fontnames, true))
end
-names.scan = scan_dir
+local function scan_external_dir(dir)
+ local old_names, new_names
+ if loaded then
+ old_names = names.data
+ else
+ old_names = names.load()
+ loaded = true
+ end
+ new_names = table.copy(old_names)
+ scan_dir("zapfino", old_names, new_names)
+ names.data = new_names
+end
+
+names.scan = scan_external_dir
names.update = update_names
names.save = save_names