Fixes
This commit is contained in:
parent
446f26cc1d
commit
8020a70ff1
@ -27,7 +27,7 @@ local special_parser do
|
|||||||
local l = lpeg or require'lpeg'
|
local l = lpeg or require'lpeg'
|
||||||
local space = l.S' '^0
|
local space = l.S' '^0
|
||||||
local name = (1-l.P' ')^1
|
local name = (1-l.P' ')^1
|
||||||
local reencode = name * space * 'ReEncodeFont'/0
|
local reencode = name * space * 'ReEncodeFont'
|
||||||
local digit = l.R'09'
|
local digit = l.R'09'
|
||||||
local number = digit^1 * ('.' * digit^0) + '.' * digit^1/tonumber
|
local number = digit^1 * ('.' * digit^0) + '.' * digit^1/tonumber
|
||||||
local milli_stmt = number * space * ('SlantFont' * l.Cc'slant' + 'ExtendFont' * l.Cc'extend') / function(n, k)
|
local milli_stmt = number * space * ('SlantFont' * l.Cc'slant' + 'ExtendFont' * l.Cc'extend') / function(n, k)
|
||||||
@ -67,7 +67,6 @@ function font.define(f)
|
|||||||
f.encoding = kpse.find_file(encoding, 'enc files')
|
f.encoding = kpse.find_file(encoding, 'enc files')
|
||||||
end
|
end
|
||||||
if entry[5] then
|
if entry[5] then
|
||||||
print(entry[5])
|
|
||||||
assert(special_parser:match(entry[5], 1, f))
|
assert(special_parser:match(entry[5], 1, f))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -82,7 +81,6 @@ function font.define(f)
|
|||||||
f.encoding = kpse.find_file(encoding, 'enc files')
|
f.encoding = kpse.find_file(encoding, 'enc files')
|
||||||
end
|
end
|
||||||
if entry[5] then
|
if entry[5] then
|
||||||
print(entry[5])
|
|
||||||
assert(special_parser:match(entry[5], 1, f))
|
assert(special_parser:match(entry[5], 1, f))
|
||||||
end
|
end
|
||||||
done = true
|
done = true
|
||||||
|
@ -37,8 +37,12 @@ end
|
|||||||
local function newpage(pdf)
|
local function newpage(pdf)
|
||||||
local pages = pdf.pages
|
local pages = pdf.pages
|
||||||
local pagenumber = #pages+1
|
local pagenumber = #pages+1
|
||||||
local pageid = pages.reserved and pages.reserved[pagenumber] or pdf:getobj()
|
local pageid = pages.reserved and pages.reserved[pagenumber]
|
||||||
|
if pageid then
|
||||||
pages.reserved[pagenumber] = nil
|
pages.reserved[pagenumber] = nil
|
||||||
|
else
|
||||||
|
pageid = pdf:getobj()
|
||||||
|
end
|
||||||
pages[pagenumber] = pageid
|
pages[pagenumber] = pageid
|
||||||
if 1 == pagenumber % 6 then
|
if 1 == pagenumber % 6 then
|
||||||
pages[-((pagenumber-1)//6)] = pdf:getobj()
|
pages[-((pagenumber-1)//6)] = pdf:getobj()
|
||||||
|
Loading…
Reference in New Issue
Block a user