diff options
author | Marius <mariausol@gmail.com> | 2011-05-14 17:40:12 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-05-14 17:40:12 +0300 |
commit | fefebde9e50a00034bc24315398d5796d9664ae6 (patch) | |
tree | 9a5a1646fcc5d8b7d65be703d72ef986c13648b3 /tex | |
parent | bcc46b67b4d49116c17086f6a20f6de1220dc688 (diff) | |
download | context-fefebde9e50a00034bc24315398d5796d9664ae6.tar.gz |
beta 2011.05.14 16:34
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/lpdf-fld.lua | 30 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23595 -> 23595 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 154366 -> 154366 bytes | |||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
8 files changed, 25 insertions, 15 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 51e96a801..bde0354a3 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.05.14 16:14} +\newcontextversion{2011.05.14 16:34} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 9f1d2f351..32f2a86fa 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.05.14 16:14} +\newcontextversion{2011.05.14 16:34} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 3af05b671..53a80364b 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.05.14 16:14} +\edef\contextversion{2011.05.14 16:34} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 2b2e95dfc..37c91ee86 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.05.14 16:14} +\edef\contextversion{2011.05.14 16:34} %D For those who want to use this: diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua index 9445333d7..590aee1ab 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -191,6 +191,8 @@ local pdfdocencodingvector, pdfdocencodingcapsule -- a glyph is not in the vector, it is still visible -- as it is taken from some other font. Messy. +-- To be checked: only when text/line fields. + local function checkpdfdocencoding() report_fields("adding pdfdoc encoding vector") local encoding = dofile(resolvers.findfile("lpdf-enc.lua")) -- no checking, fatal if not present @@ -269,7 +271,7 @@ end local function registerfonts() if next(usedfonts) then - checkpdfdocencoding() + checkpdfdocencoding() -- already done local d = pdfdictionary() local pdffonttype, pdffontsubtype = pdfconstant("Font"), pdfconstant("Type1") for tag, name in next, usedfonts do @@ -650,9 +652,11 @@ end -- finish -local collected = pdfarray() +local collected = pdfarray() +local forceencoding = false local function finishfields() + local sometext = forceencoding for name, field in next, fields do local kids = field.kids if kids then @@ -662,6 +666,10 @@ local function finishfields() if opt then pdfflushobject(field.optnum,opt) end + local type = field.type + if not sometext and (type == "text" or type == "line") then + sometext = true + end end for name, field in next, radios do local kids = field.kids @@ -674,18 +682,20 @@ local function finishfields() end end if #collected > 0 then - checkpdfdocencoding() - usedfonts.tttf = fontnames.tt.tf local acroform = pdfdictionary { NeedAppearances = true, - Fields = pdfreference(pdfflushobject(collected)), - DR = pdfdictionary { + Fields = pdfreference(pdfflushobject(collected)), + CO = fieldsetlist(calculationset), + } + if sometext then + checkpdfdocencoding() + usedfonts.tttf = fontnames.tt.tf + acroform.DA = "/tttf 12 Tf 0 g" + acroform.DR = pdfdictionary { Font = registerfonts(), Encoding = pdfdocencodingcapsule, - }, - CO = fieldsetlist(calculationset), - DA = "/tttf 12 Tf 0 g", - } + } + end lpdf.addtocatalog("AcroForm",pdfreference(pdfflushobject(acroform))) end end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 27d2d5975..ffe3b9c23 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex a45b4ff0a..201f19d0f 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 983d5f4b4..3cebee2e1 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/14/11 16:14:48 +-- merge date : 05/14/11 16:34:12 do -- begin closure to overcome local limits and interference |