瀏覽代碼

[Minor] Pdf: Disable fonts processing for now

tags/2.6
Vsevolod Stakhov 4 年之前
父節點
當前提交
a245f4f38a
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      lualib/lua_content/pdf.lua

+ 7
- 2
lualib/lua_content/pdf.lua 查看文件

@@ -491,6 +491,7 @@ end

-- Extracts font data and process /ToUnicode mappings
-- NYI in fact as cmap is ridiculously stupid and complicated
--[[
local function process_font(task, pdf, font, fname)
local dict = font
if font.dict then
@@ -507,6 +508,7 @@ local function process_font(task, pdf, font, fname)
end
end
end
--]]

-- Forward declaration
local process_dict
@@ -711,9 +713,11 @@ process_dict = function(task, pdf, obj, dict)
obj.resources = resources
end

local fonts = obj.resources.Font

if fonts and type(fonts) == 'table' then

--[[Disabled fonts extraction
local fonts = obj.resources.Font
if fonts and type(fonts) == 'table' then
obj.fonts = {}
for k,v in pairs(fonts) do
obj.fonts[k] = maybe_dereference_object(v, pdf, task)
@@ -729,6 +733,7 @@ process_dict = function(task, pdf, obj, dict)
end
end
end
]]

lua_util.debugm(N, task, 'found resources for object %s:%s (%s): %s',
obj.major, obj.minor, obj.type, obj.resources)

Loading…
取消
儲存