diff options
author | Marius <mariausol@gmail.com> | 2011-04-22 19:40:44 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-04-22 19:40:44 +0300 |
commit | 6f891b8572f03990803f9cb1ceb5870fcbe4d240 (patch) | |
tree | 419dc45860d70876c4a7e590eae9fc38cfcde8a0 /tex/context/base/lpdf-fld.lua | |
parent | 48aee08be6614bf30710ae7c42248f64d55f8f22 (diff) | |
download | context-6f891b8572f03990803f9cb1ceb5870fcbe4d240.tar.gz |
beta 2011.04.22 18:17
Diffstat (limited to 'tex/context/base/lpdf-fld.lua')
-rw-r--r-- | tex/context/base/lpdf-fld.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua index ec09a00ee..9445333d7 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -249,9 +249,10 @@ local function fieldsurrounding(specification) end local tag = fontstyle .. fontalternative fontsize = todimen(fontsize) - fontsize = (fontsize and (bpfactor * fontsize)) or 12 + fontsize = fontsize and (bpfactor * fontsize) or 12 fontraise = 0.1 * fontsize -- todo: figure out what the natural one is and compensate for strutdp local fontcode = format("%0.4f Tf %0.4f Ts",fontsize,fontraise) + -- we could test for colorvalue being 1 (black) and omit it then local colorcode = lpdf.color(3,colorvalue) -- we force an rgb color space if trace_fields then report_fields("fontcode : %s %s @ %s => %s => %s",fontstyle,fontalternative,fontsize,tag,fontcode) @@ -426,7 +427,7 @@ local function fieldrendering(specification) local bvalue = tonumber(specification.backgroundcolorvalue) local fvalue = tonumber(specification.framecolorvalue) local svalue = specification.fontsymbol - if bvalue or fvalue or svalue then + if bvalue or fvalue or (svalue and svalue ~= "") then return pdfdictionary { BG = bvalue and pdfarray { lpdf.colorvalues(3,bvalue) } or nil, BC = fvalue and pdfarray { lpdf.colorvalues(3,fvalue) } or nil, |