diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/font-otl.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/font-otl.lua | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua index df83dc96825..a71e3ad98ca 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-otl.lua @@ -52,14 +52,14 @@ local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.handlers.otf -otf.version = 3.107 -- beware: also sync font-mis.lua and in mtx-fonts -otf.cache = containers.define("fonts", "otl", otf.version, true) -otf.svgcache = containers.define("fonts", "svg", otf.version, true) -otf.pngcache = containers.define("fonts", "png", otf.version, true) -otf.pdfcache = containers.define("fonts", "pdf", otf.version, true) +otf.version = 3.103 -- beware: also sync font-mis.lua and in mtx-fonts +otf.cache = containers.define("fonts", "otl", otf.version, true) +otf.svgcache = containers.define("fonts", "svg", otf.version, true) +otf.sbixcache = containers.define("fonts", "sbix", otf.version, true) +otf.pdfcache = containers.define("fonts", "pdf", otf.version, true) otf.svgenabled = false -otf.pngenabled = false +otf.sbixenabled = false local otfreaders = otf.readers @@ -152,17 +152,17 @@ function otf.load(filename,sub,instance) report_otf("forced reload of %a due to hard coded flag",filename) reload = true end - if reload then + if reload then report_otf("loading %a, hash %a",filename,hash) -- - starttiming(otfreaders,true) + starttiming(otfreaders) data = otfreaders.loadfont(filename,sub or 1,instance) -- we can pass the number instead (if it comes from a name search) if data then -- todo: make this a plugin - local used = checkmemory() - local resources = data.resources - local svgshapes = resources.svgshapes - local pngshapes = resources.pngshapes + local used = checkmemory() + local resources = data.resources + local svgshapes = resources.svgshapes + local sbixshapes = resources.sbixshapes if cleanup == 0 then checkmemory(used,threshold,tracememory) end @@ -186,16 +186,16 @@ function otf.load(filename,sub,instance) checkmemory(used,threshold,tracememory) end end - if pngshapes then - resources.pngshapes = nil - if otf.pngenabled then + if sbixshapes then + resources.sbixshapes = nil + if otf.sbixenabled then local timestamp = os.date() -- work in progress ... a bit boring to do - containers.write(otf.pngcache,hash, { - pngshapes = pngshapes, - timestamp = timestamp, + containers.write(otf.sbixcache,hash, { + sbixshapes = sbixshapes, + timestamp = timestamp, }) - data.properties.png = { + data.properties.sbix = { hash = hash, timestamp = timestamp, } @@ -242,7 +242,6 @@ function otf.load(filename,sub,instance) checkmemory(used,threshold,tracememory) end else - stoptiming(otfreaders) data = nil report_otf("loading failed due to read error") end @@ -406,7 +405,6 @@ local function copytotfm(data,cache_id) local fontname = metadata.fontname local fullname = metadata.fullname or fontname local psname = fontname or fullname - local subfont = metadata.subfontindex local units = metadata.units or 1000 -- if units == 0 then -- catch bugs in fonts @@ -501,7 +499,6 @@ local function copytotfm(data,cache_id) properties.fullname = fullname properties.psname = psname properties.name = filename or fullname - properties.subfont = subfont -- -- properties.name = specification.name -- properties.sub = specification.sub |