# Re: [NTG-context] A better \definesymbol sought

On 2017-01-24 03:34, Hans Hagen wrote:

On 1/24/2017 4:04 AM, Rik wrote:


What I want is that the background of the page (yellow in this case)
should show through. That is what is done with fill / reverse / cycle,
as in:

\setupbackgrounds
[page]
[background=color,backgroundcolor=yellow]
\startuseMPgraphic{CircleTest}
path p,q ;
p := fullcircle scaled 2cm ;
q := fullcircle scaled 1cm ;
fill p -- reverse q -- cycle withcolor blue;
\stopuseMPgraphic
\starttext
\useMPgraphic{CircleTest}
\stoptext


where the background color (yellow) comes through the inner circle (path q).

Can this be done with text characters? I suspect that the answer is that
the glyphs have to be converted to paths and that it will only work when


\setupbackgrounds
[page]
[background=color,
backgroundcolor=yellow]
\starttext
\startcolor[blue]\starteffect[outer]PQR\stopeffect\stopcolor
\stoptext



Still not there.


Is there a way to define the ? characters to remove their coloring in the output of the following so that the background yellow appears through the outline even within the portions of the ?s placed on the blue heart? I want to be able to place this over arbitrary text and color backgrounds (stencil-like) so that the arbitrary text and background color shows through.


\setupbackgrounds
[page]
[background={color,bgtext},backgroundcolor=yellow]
\definelayer
[bgtext]
[x=1in,
y=2.0in,
state=start]
\setlayerframed
[bgtext]
{\setupbodyfont[36pt]@@@}
\definefont
[DVSrB]
[file:DejaVuSerif-Bold.ttf]
\startbuffer[Outer]
\startcolor[blue]
\starteffect
[outer]
{\DVSrB ???}
\stopeffect
\stopcolor
\stopbuffer
\startuseMPgraphic{HeartTest}
picture h,q ;
h := "♥" infont "\truefontname{DejaVuSerif-Bold.ttf}" scaled 5 ;
q := textext("{\getbuffer[Outer]}") scaled 3 ;
draw h withcolor blue ;
draw q ;
\stopuseMPgraphic
\starttext
\starttext
\useMPgraphic{HeartTest}
\stoptext

--
Rik


___________________________________________________________________________________
___________________________________________________________________________________