Am 06.07.23 um 21:27 schrieb Henning Hraban Ramm:
* I don’t understand why the white fill is not opaque.

Posted too early. I do understand now (overlapping outlines).
Tried to fix it by overwriting the text again in white, but now I don’t understand how to calculate the shifting:

"""
\setupbodyfont[ss,24pt]
\definecolor[tshade][t=.05,a=1,k=1]

\starttexdefinition MyCaption #1
\startMPcode{doublefun}
steps := 10 ;
rulesize := BodyFontSize/steps/3;
for step = 1 upto steps:
    draw lmt_outline [
        text = "\bf #1",
        %style = "bold", % doesn’t work
        kind = "both",
        fillcolor = "white",
        drawcolor = "tshade",
        rulethickness = (step*rulesize),
    ] xshifted -193; % why is this shifted at all?
endfor;
draw lmt_text [
        text = "#1",
        style = "bold",
        color = "white",
] yshifted (steps*rulesize);
\stopMPcode
\stoptexdefinition

\starttext

\MyCaption{Eine wunderschöne Bildunterschrift}

\MyCaption{Ein ganz anderer Text}

\stoptext
"""

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to