summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-11-05 22:22:37 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2013-11-05 22:22:37 +0100
commit947a07ebf509f7961673fdfdafb0cf1ea6faec4a (patch)
tree0d1d834fbe7f5be4f52c57c1fb19aec15fdaa499
parente0a62d13f16573b7461269bb022516634b7fce3d (diff)
downloadluaotfload-947a07ebf509f7961673fdfdafb0cf1ea6faec4a.tar.gz
[db,tool] adapt --prefer-texmf
-rw-r--r--luaotfload-database.lua17
-rwxr-xr-xluaotfload-tool.lua6
2 files changed, 10 insertions, 13 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 291abe5..868541b 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -154,6 +154,10 @@ local location_precedence = {
"local", "system", "texmf",
}
+local set_location_precedence = function (precedence)
+ location_precedence = precedence
+end
+
--[[doc--
We use the functions in the cache.* namespace that come with the
fontloader (see luat-basics-gen). it’s safe to use for the most part
@@ -2505,16 +2509,6 @@ local generate_filedata = function (mappings)
full [index] = fullpath
end
- --- TODO adapt to new mechanism!
--- if luaotfloadconfig.prioritize == "texmf" then
--- report("both", 2, "db", "Preferring texmf fonts")
--- addmap(sys)
--- addmap(texmf)
--- else --- sys
--- addmap(texmf)
--- addmap(sys)
--- end
-
return files
end
@@ -2530,7 +2524,7 @@ local check_regular
do
local italic = match_synonyms (P"oblique" + P"slanted" + P"italic")
- local bold = match_synonyms (P"bold" + P"demi", P"heavy", P"black", P"ultra")
+ local bold = match_synonyms (P"bold" + P"demi" + P"heavy" + P"black" + P"ultra")
determine_italic = function (fontstyle_name,
italicangle,
@@ -3323,6 +3317,7 @@ names.crude_file_lookup_verbose = crude_file_lookup_verbose
names.read_blacklist = read_blacklist
names.sanitize_fontname = sanitize_fontname
names.getfilename = resolve_fullpath
+names.set_location_precedence = set_location_precedence
--- font cache
names.purge_cache = purge_cache
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 4f084ae..0cc26d2 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -1195,8 +1195,10 @@ local process_cmdline = function ( ) -- unit -> jobspec
result.cache = optarg[n]
elseif v == "D" then
result.dry_run = true
- elseif v == "p" then --- TODO adapt to new db structure
- luaotfloadconfig.prioritize = "texmf"
+ elseif v == "p" then
+ names.set_location_precedence {
+ "local", "texmf", "system"
+ }
elseif v == "b" then
action_pending["blacklist"] = true
elseif v == "diagnose" then