diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-28 12:59:51 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-28 12:59:51 +0200 | 
| commit | a1ab3fe5a146cf741d517be62985b97268de624b (patch) | |
| tree | a9a3d2494811738be04a88fa3d215f532c84d787 | |
| parent | 4821fad2ff58fa8c4fbee58cbb6fe5353e047613 (diff) | |
| download | luaotfload-a1ab3fe5a146cf741d517be62985b97268de624b.tar.gz | |
add fallback for specification name
| -rw-r--r-- | luaotfload-database.lua | 12 | ||||
| -rw-r--r-- | luaotfload-features.lua | 6 | 
2 files changed, 9 insertions, 9 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 576971e..b678f51 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -437,7 +437,7 @@ local cached_resolver = function (specification)      if not names.data then names.data = load_names() end      local request_cache = names.data.request_cache      local request = specification.specification -    report("info", 4, "cache", +    report("log", 4, "cache",             "looking for ā%sā in cache ...",             request)      local found = names.data.request_cache[request] @@ -449,7 +449,7 @@ local cached_resolver = function (specification)          end          return specification      end -    report("info", 4, "cache", "not cached; resolving") +    report("log", 4, "cache", "not cached; resolving")      --- first we resolve normally ...      local resolved_spec = normal_resolver(specification) @@ -459,7 +459,7 @@ local cached_resolver = function (specification)          local f = cache_fields[i]          entry[f] = resolved_spec[f]      end -    report("info", 4, "cache", "new entry: %s", request) +    report("log", 4, "cache", "new entry: %s", request)      names.data.request_cache[request] = entry      --- obviously, the updated cache needs to be stored. @@ -467,7 +467,7 @@ local cached_resolver = function (specification)      --- whenever the cache is updated.      --- TODO this should trigger a save only once the      ---      document is compiled (finish_pdffile callback?) -    report("info", 5, "cache", "saving updated cache") +    report("log", 5, "cache", "saving updated cache")      save_names()      return resolved_spec  end @@ -480,7 +480,7 @@ local resolvers = {  fonts.definers.resolve = resolvers[config.luaotfload.resolver]  --fonts.definers.resolve = resolvers.cached -fonts.definers.resolve = resolvers.dummy +--fonts.definers.resolve = resolvers.dummy  --[[doc-- @@ -1268,7 +1268,7 @@ local function get_os_dirs()          local os_dirs = {}          for _,p in next, {"/usr/local/etc/fonts/fonts.conf", "/etc/fonts/fonts.conf"} do              if lfs.isfile(p) then -                read_fonts_conf(p, os_dirs, passed_paths) +                paths = read_fonts_conf(p, os_dirs, passed_paths)              end          end          return os_dirs diff --git a/luaotfload-features.lua b/luaotfload-features.lua index cd639b6..f3d9158 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -401,9 +401,9 @@ local import_values = {      "style", "optsize", "lookup", "sub" --[[ā½]], "mode",  } -local handle_name = function (specification, raw) +local handle_name = function (specname, raw)      --- FIXME only file: and name: atm -    local name = raw.file or raw.name +    local name = raw.file or raw.name or specname      local lookup      --- why is this here?      --- TODO should we keep this, check if it applies only to tfm and @@ -424,7 +424,7 @@ local handle_request = function (specification)                                    specification.specification)      request.features  = set_default_features(request.features) -    local name, lookup = handle_name(specification, request) +    local name, lookup = handle_name(specification.name, request)      if name then          specification.name    = name          specification.lookup  = lookup or specification.lookup  | 
