diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-01-19 12:15:05 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-01-19 12:15:05 +0100 |
commit | 57cb4d86632ca8ec2a5f5aba4d75bc0e8c46c55c (patch) | |
tree | 4bcd48dccb8cc7ba6d733f5f54445d3a598f8f3d /tex/context/base/lpdf-col.lua | |
parent | 9038785580cd32664ad91b25a2e564899fc2651e (diff) | |
download | context-57cb4d86632ca8ec2a5f5aba4d75bc0e8c46c55c.tar.gz |
2015-01-19 11:22:00
Diffstat (limited to 'tex/context/base/lpdf-col.lua')
-rw-r--r-- | tex/context/base/lpdf-col.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tex/context/base/lpdf-col.lua b/tex/context/base/lpdf-col.lua index 924414d40..030291c29 100644 --- a/tex/context/base/lpdf-col.lua +++ b/tex/context/base/lpdf-col.lua @@ -184,7 +184,7 @@ local f_gray_function = formatters["%s mul"] local documentcolorspaces = pdfdictionary() -local spotcolorhash = { } -- not needed +local spotcolorhash = { } -- not needed local spotcolornames = { } local indexcolorhash = { } local delayedindexcolors = { } @@ -202,7 +202,7 @@ end -- This should become delayed i.e. only flush when used; in that case we need -- need to store the specification and then flush them when accesssomespotcolor -- is called. At this moment we assume that splotcolors that get defined are --- also used which keeps the overhad small anyway. +-- also used which keeps the overhad small anyway. Tricky for mp ... local processcolors @@ -240,6 +240,7 @@ local function registersomespotcolor(name,noffractions,names,p,colorspace,range, local colorants = pdfdictionary() for n in gmatch(names,"[^,]+") do local name = spotcolornames[n] or n + -- the cmyk names assume that they are indeed these colors if n == "cyan" then name = "Cyan" elseif n == "magenta" then @@ -250,9 +251,15 @@ local function registersomespotcolor(name,noffractions,names,p,colorspace,range, name = "Black" else local sn = spotcolorhash[name] or spotcolorhash[n] + if not sn then + report_color("defining %a as colorant",name) + colors.definespotcolor("",name,"p=1",true) + sn = spotcolorhash[name] or spotcolorhash[n] + end if sn then colorants[name] = pdfreference(sn) else + -- maybe some day generate colorants (spot colors for multi) automatically report_color("unknown colorant %a, using black instead",name or n) name = "Black" end |