diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2009-11-27 13:47:48 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2009-11-27 13:47:48 +0200 |
commit | 2f7e5d92dd3653654bf4e42da9f883a16655037e (patch) | |
tree | 594b18483753248c26768903a9c5d315c01eae71 /otfl-font-cid.lua | |
parent | 78d506538016cd295d9a84ac62e3e036f23feffc (diff) | |
download | luaotfload-2f7e5d92dd3653654bf4e42da9f883a16655037e.tar.gz |
Updating to latest ConTeXt stable (2009.11.26)
See http://wiki.contextgarden.net/Context_2009.11.26 for list of
changes.
Diffstat (limited to 'otfl-font-cid.lua')
-rw-r--r-- | otfl-font-cid.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/otfl-font-cid.lua b/otfl-font-cid.lua index 13e9cce..7165288 100644 --- a/otfl-font-cid.lua +++ b/otfl-font-cid.lua @@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['font-cid'] = { license = "see context related readme files" } -local format, match = string.format, string.match +local format, match, lower = string.format, string.match, string.lower local tonumber = tonumber local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) @@ -79,8 +79,9 @@ end local template = "%s-%s-%s.cidmap" local function locate(registry,ordering,supplement) - local filename = string.lower(format(template,registry,ordering,supplement)) - local cidmap = fonts.cid.map[filename] + local filename = format(template,registry,ordering,supplement) + local hashname = lower(filename) + local cidmap = fonts.cid.map[hasnname] if not cidmap then if trace_loading then logs.report("load otf","checking cidmap, registry: %s, ordering: %s, supplement: %s, filename: %s",registry,ordering,supplement,filename) @@ -92,7 +93,7 @@ local function locate(registry,ordering,supplement) if trace_loading then logs.report("load otf","using cidmap file %s",filename) end - fonts.cid.map[filename] = cidmap + fonts.cid.map[hashname] = cidmap cidmap.usedname = file.basename(filename) return cidmap end |