On 26-1-2011 1:49, Reviczky, Adam wrote:
Hi,
I was playing a bit more with the field style properties and found out that if
the font size is always different it works, but as soon as it has a size that
was used before it defaults back to normal.
Here's the minimal example:
% begin of example
\starttext
\setupfields
[label,frame,horizontal]
[offset=4pt,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
[height=40pt,width=100pt,align=middle,background=screen,backgroundscreen=.90,frame=off]
[height=40pt,width=100pt,color=red,align=right,style=type,background=screen,backgroundscreen=.90,frame=off]
\setupfield
[sizea]
[horizontal]
[style={\switchtobodyfont[20pt]}]
\setupfield
[sizeb]
[horizontal]
[style={\switchtobodyfont[28pt]}]
\setupfield
[sizec]
[horizontal]
[style={\switchtobodyfont[20pt]}]
\definefield [Emaila] [line] [sizea] [] [pra...@wxs.nl]
\definefield [Emailb] [line] [sizeb] [] [pra...@wxs.nl]
\definefield [Emailc] [line] [sizec] [] [pra...@wxs.nl]
\field [Emaila] [your email]
\par
\field [Emailb] [your email]
\par
\field [Emailc] [your email]
\stoptext
% end of example
(field of Emaila has fontsize 20pt as defined, field of Emailb has fontsize
28pt as defined, but field of Emailc defaults back to normal 12pt? size instead
of the defined 20pt. See attached pdf.)
in scrn-fld.mkiv patch this:
fontsize = "\fontbody", % \currentfontbodysize",
and remake the formats.
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________