diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-29 16:15:09 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-29 16:15:09 +0100 |
commit | 452587cdeefbf6e3bf1eee91e4e976f1135b785f (patch) | |
tree | e52f05dfd327c3b31a1b0fb82545dbdec639d2e2 /tex/generic | |
parent | 975f4f9f2d71d8021900955404f8b144ca6895f5 (diff) | |
download | context-452587cdeefbf6e3bf1eee91e4e976f1135b785f.tar.gz |
2016-01-28 22:37:00
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-gadgets.lua | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 2b82ed01a..89137591a 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 01/18/16 22:21:50 +-- merge date : 01/28/16 22:35:09 do -- begin closure to overcome local limits and interference diff --git a/tex/generic/context/luatex/luatex-gadgets.lua b/tex/generic/context/luatex/luatex-gadgets.lua index 9bf423fda..8c835babb 100644 --- a/tex/generic/context/luatex/luatex-gadgets.lua +++ b/tex/generic/context/luatex/luatex-gadgets.lua @@ -73,3 +73,32 @@ function marking.remove(str) end end end + +-- local imgscan = img.scan +-- +-- local valid = { +-- ["png"] = "^" .. string.char(0x89,0x50,0x4E,0x47,0x0D,0x0A,0x1A,0x0A), +-- ["jpg"] = "^" .. string.char(0xFF,0xD8,0xFF), +-- ["jp2"] = "^" .. string.char(0x00,0x00,0x00,0x0C,0x6A,0x50,0x20,0x20,0x0D,0x0A), +-- ["pdf"] = "^" .. ".-%%PDF", +-- } +-- +-- function img.scan(t) +-- if t and t.filename then +-- local f = io.open(t.filename,"rb") +-- if f then +-- local d = f:read(4096) +-- for k, v in next,valid do +-- if string.find(d,v) then +-- f:close() -- be nice +-- return imgscan(t) +-- end +-- end +-- f:close() -- be nice +-- end +-- end +-- end +-- +-- print(img.scan({filename = "hacker1b.tif"})) +-- print(img.scan({filename = "cow.pdf"})) +-- print(img.scan({filename = "mill.png"})) |