From d537da741abd9c53eae3c2de8c1df68e448be2f0 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 26 Jan 2011 11:02:00 +0100 Subject: beta 2011.01.26 11:02 --- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/lpdf-fld.lua | 26 ++++++++++++++++---------- tex/context/base/scrn-fld.mkiv | 3 ++- tex/context/base/status-files.pdf | Bin 23909 -> 23907 bytes tex/generic/context/luatex-fonts-merged.lua | 2 +- 8 files changed, 23 insertions(+), 16 deletions(-) diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index fb3fe8419..990a94a90 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.01.26 09:01} +\newcontextversion{2011.01.26 11:02} %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 e68e2b158..0fa55848f 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.01.26 09:01} +\newcontextversion{2011.01.26 11:02} %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 31f00884a..01fb8ff08 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.01.26 09:01} +\edef\contextversion{2011.01.26 11:02} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index dfd67c6a2..6bc1036fd 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.01.26 09:01} +\edef\contextversion{2011.01.26 11:02} %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 969383595..79b184e9a 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -184,25 +184,31 @@ local fontnames = { local usedfonts = { } local function fieldsurrounding(specification) - local size = specification.fontsize or "12pt" - local style = specification.fontstyle or "rm" - local alternative = specification.fontalternative or "tf" - local s = fontnames[style] + local fontsize = specification.fontsize or "12pt" + local fontstyle = specification.fontstyle or "rm" + local fontalternative = specification.fontalternative or "tf" + local colorvalue = specification.colorvalue + local s = fontnames[fontstyle] if not s then - style, s = "rm", fontnames.rm + fontstyle, s = "rm", fontnames.rm end - local a = s[alternative] + local a = s[fontalternative] if not a then alternative, a = "tf", s.tf end - local tag = style .. alternative - size = todimen(size) + local tag = fontstyle .. fontalternative + fontsize = todimen(fontsize) + local fontcode = format("%0.4f Tf",(fontsize and (bpfactor * fontsize)) or 12) + 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) + report_fields("colorcode: %s => %s",colorvalue,colorcode) + end local stream = pdfstream { pdfconstant(tag), - format("%0.4f Tf",(size and (bpfactor * size)) or 12), + format("%s %s",fontcode,colorcode) } usedfonts[tag] = a -- the name - -- add color to stream: 0 g -- move up with "x.y Ts" return tostring(stream) end diff --git a/tex/context/base/scrn-fld.mkiv b/tex/context/base/scrn-fld.mkiv index 3ba91ff48..7fc88a39f 100644 --- a/tex/context/base/scrn-fld.mkiv +++ b/tex/context/base/scrn-fld.mkiv @@ -88,8 +88,9 @@ style = "\@@fdstyle", fontstyle = "\fontstyle", fontalternative = "\fontalternative", - fontsize = "\currentfontbodysize", + fontsize = "\fontbody", color = "\@@fdcolor", + colorvalue = \thecolorattribute\@@fdcolor, backgroundcolor = "\@@fdfieldbackgroundcolor", framecolor = "\@@fdfieldframecolor", layer = "\@@fdfieldlayer", diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index a5b0a9e30..56bc18218 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 5ad6a4edf..052224006 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 : 01/26/11 09:01:20 +-- merge date : 01/26/11 11:02:23 do -- begin closure to overcome local limits and interference -- cgit v1.2.3