diff options
Diffstat (limited to 'tex/context/base/mkiv/font-mis.lua')
-rw-r--r-- | tex/context/base/mkiv/font-mis.lua | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/tex/context/base/mkiv/font-mis.lua b/tex/context/base/mkiv/font-mis.lua index 68165c9b8..c3fb58580 100644 --- a/tex/context/base/mkiv/font-mis.lua +++ b/tex/context/base/mkiv/font-mis.lua @@ -27,32 +27,35 @@ if readers then function fonts.helpers.getfeatures(name,save) local filename = resolvers.findfile(name) or "" if filename ~= "" then --- local name = file.removesuffix(file.basename(filename)) --- local cleanname = containers.cleanname(name) --- local data = containers.read(otf.cache,cleanname) --- if data then --- readers.unpack(data) --- else --- data = readers.loadfont(filename) -- we can do a more minimal load --- -- if data and save then --- -- -- keep this in sync with font-otl --- -- readers.compact(data) --- -- readers.rehash(data,"unicodes") --- -- readers.addunicodetable(data) --- -- readers.extend(data) --- -- readers.pack(data) --- -- -- till here --- -- containers.write(otf.cache,cleanname,data) --- -- end --- end --- if not data then --- data = readers.loadfont(filename) -- we can do a more minimal load --- end --- if data then --- readers.unpack(data) --- end -local data = otf.load(filename) - return data and data.resources and data.resources.features + -- local name = file.removesuffix(file.basename(filename)) + -- local cleanname = containers.cleanname(name) + -- local data = containers.read(otf.cache,cleanname) + -- if data then + -- readers.unpack(data) + -- else + -- data = readers.loadfont(filename) -- we can do a more minimal load + -- -- if data and save then + -- -- -- keep this in sync with font-otl + -- -- readers.compact(data) + -- -- readers.rehash(data,"unicodes") + -- -- readers.addunicodetable(data) + -- -- readers.extend(data) + -- -- readers.pack(data) + -- -- -- till here + -- -- containers.write(otf.cache,cleanname,data) + -- -- end + -- end + -- if not data then + -- data = readers.loadfont(filename) -- we can do a more minimal load + -- end + -- if data then + -- readers.unpack(data) + -- end + local data = otf.load(filename) + local resources = data and data.resources + if resources then + return data.resources.features, data.resources.foundtables, data + end end end |