diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-10-01 11:01:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-10-01 11:01:50 +0200 |
commit | 7b12427f475e64e06f5dd7b537462b6d990526f6 (patch) | |
tree | c8b553e26752f0900f8f50241970bb5cdefd3938 /tex/context/base/mkiv/font-dsp.lua | |
parent | fd8697791360a26a2b9cc888dbc125cefedfcd42 (diff) | |
download | context-7b12427f475e64e06f5dd7b537462b6d990526f6.tar.gz |
2019-10-01 10:44:00
Diffstat (limited to 'tex/context/base/mkiv/font-dsp.lua')
-rw-r--r-- | tex/context/base/mkiv/font-dsp.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua index 79749741c..7777f9c6a 100644 --- a/tex/context/base/mkiv/font-dsp.lua +++ b/tex/context/base/mkiv/font-dsp.lua @@ -3159,6 +3159,14 @@ function readers.cpal(f,fontdata,specification) end end +local compress = gzip and gzip.compress +local compressed = compress and gzip.compressed + +-- At some point I will delay loading and only store the offsets (in context lmtx +-- only). + +-- compressed = false + function readers.svg(f,fontdata,specification) local tableoffset = gotodatatable(f,fontdata,"svg",specification.glyphs) if tableoffset then @@ -3184,10 +3192,14 @@ function readers.svg(f,fontdata,specification) for i=1,nofentries do local entry = entries[i] setposition(f,entry.offset) + local data = readstring(f,entry.length) + if compressed and not compressed(data) then + data = compress(data) + end entries[i] = { first = entry.first, last = entry.last, - data = readstring(f,entry.length) + data = data } end fontdata.svgshapes = entries |