diff options
Diffstat (limited to 'tex/context/base/lpdf-fld.lua')
-rw-r--r-- | tex/context/base/lpdf-fld.lua | 153 |
1 files changed, 5 insertions, 148 deletions
diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua index 8b2ccaaec..c189b8a67 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -16,7 +16,7 @@ local bpfactor, todimen = number.dimenfactors.bp, string.todimen local trace_fields = false trackers.register("widgets.fields", function(v) trace_fields = v end) -local report_fields = logs.new("backend","fields") +local report_fields = logs.reporter("backend","fields") local backends, lpdf = backends, lpdf @@ -180,154 +180,11 @@ end local pdfdocencodingvector, pdfdocencodingcapsule +-- we could save some bytes by pasing the vector as string + local function checkpdfdocencoding() - -- not using pdfconstant for all these names saves us quite - -- some bytecode - local encoding = pdfdictionary { - Type = pdfconstant("Encoding"), - Differences = pdfarray { - 24, - "/breve", - "/caron", - "/circumflex", - "/dotaccent", - "/hungarumlaut", - "/ogonek", - "/ring", - "/tilde", - 39, - "/quotesingle", - 96, - "/grave", - 128, - "/bullet", - "/dagger", - "/daggerdbl", - "/ellipsis", - "/emdash", - "/endash", - "/florin", - "/fraction", - "/guilsinglleft", - "/guilsinglright", - "/minus", - "/perthousand", - "/quotedblbase", - "/quotedblleft", - "/quotedblright", - "/quoteleft", - "/quoteright", - "/quotesinglbase", - "/trademark", - "/fi", - "/fl", - "/Lslash", - "/OE", - "/Scaron", - "/Ydieresis", - "/Zcaron", - "/dotlessi", - "/lslash", - "/oe", - "/scaron", - "/zcaron", - 160, - "/Euro", - 164, - "/currency", - 166, - "/brokenbar", - 168, - "/dieresis", - "/copyright", - "/ordfeminine", - 172, - "/logicalnot", - "/.notdef", - "/registered", - "/macron", - "/degree", - "/plusminus", - "/twosuperior", - "/threesuperior", - "/acute", - "/mu", - 183, - "/periodcentered", - "/cedilla", - "/onesuperior", - "/ordmasculine", - 188, - "/onequarter", - "/onehalf", - "/threequarters", - 192, - "/Agrave", - "/Aacute", - "/Acircumflex", - "/Atilde", - "/Adieresis", - "/Aring", - "/AE", - "/Ccedilla", - "/Egrave", - "/Eacute", - "/Ecircumflex", - "/Edieresis", - "/Igrave", - "/Iacute", - "/Icircumflex", - "/Idieresis", - "/Eth", - "/Ntilde", - "/Ograve", - "/Oacute", - "/Ocircumflex", - "/Otilde", - "/Odieresis", - "/multiply", - "/Oslash", - "/Ugrave", - "/Uacute", - "/Ucircumflex", - "/Udieresis", - "/Yacute", - "/Thorn", - "/germandbls", - "/agrave", - "/aacute", - "/acircumflex", - "/atilde", - "/adieresis", - "/aring", - "/ae", - "/ccedilla", - "/egrave", - "/eacute", - "/ecircumflex", - "/edieresis", - "/igrave", - "/iacute", - "/icircumflex", - "/idieresis", - "/eth", - "/ntilde", - "/ograve", - "/oacute", - "/ocircumflex", - "/otilde", - "/odieresis", - "/divide", - "/oslash", - "/ugrave", - "/uacute", - "/ucircumflex", - "/udieresis", - "/yacute", - "/thorn", - "/ydieresis", - }, - } + report_fields("adding pdfdoc encoding vector") + local encoding = dofile(resolvers.findfile("lpdf-enc.lua")) -- no checking, fatal if not present pdfdocencodingvector = pdfreference(pdfflushobject(encoding)) local capsule = pdfdictionary { PDFDocEncoding = pdfdocencodingvector |