summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-database.lua13
-rw-r--r--src/luaotfload-main.lua2
2 files changed, 7 insertions, 8 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 923f7c5..54738df 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -1346,6 +1346,7 @@ end --- find_closest()
local load_font_file = function (filename, subfont)
local rawfont, _msg = fontloaderopen (filename, subfont)
+ --local rawfont, _msg = fontloaderinfo (filename, subfont)
if not rawfont then
report ("log", 1, "db", "ERROR: failed to open %s.", filename)
return
@@ -1406,12 +1407,13 @@ end
--]]--
local get_raw_info = function (metadata, basename)
local fullname
- local fontname
+ local fontname = metadata.fontname
+ local fullname = metadata.fullname
local psname
local validation_state = metadata.validation_state
- if validation_state
- and tablecontains (validation_state, "bad_ps_fontname")
+ if (validation_state and tablecontains (validation_state, "bad_ps_fontname"))
+ or not fontname
then
--- Broken names table, e.g. avkv.ttf with UTF-16 strings;
--- we put some dummies in place like the fontloader
@@ -1421,9 +1423,6 @@ local get_raw_info = function (metadata, basename)
basename)
fontname = "bad-fontname-" .. basename
fullname = "bad-fullname-" .. basename
- else
- fontname = metadata.fontname
- fullname = metadata.fullname
end
return {
@@ -1541,7 +1540,7 @@ local organize_styledata = function (fontname,
metadata,
english_names,
info)
- local pfminfo = metadata.pfminfo
+ local pfminfo = metadata.pfminfo or { }
local names = metadata.names
return {
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index ed7fdd3..3c4c770 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -61,7 +61,7 @@ config.luaotfload.index_file = config.luaotfload.index_file or "luaot
config.luaotfload.formats = config.luaotfload.formats or "otf,ttf,ttc,dfont"
config.luaotfload.scan_local = config.luaotfload.scan_local == true
-if not config.luaotfload.strip then
+if config.luaotfload.strip == nil then
config.luaotfload.strip = true
end