ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* text width shadow background
@ 2023-07-06 19:27 Henning Hraban Ramm
  2023-07-06 19:41 ` Henning Hraban Ramm
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2023-07-06 19:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Hi, maybe you remember that I wanted this since 2017...

I finally managed to get a fuzzy background behind text:

"""
\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),
	];
endfor;
\stopMPcode
\stoptexdefinition

\starttext

\MyCaption{Eine wunderschöne Bildunterschrift}

\stoptext
"""

Remaining problems:

* lmt_outline doesn’t understand "style"; would be nice.

* I don’t understand why the white fill is not opaque.

Hraban

[-- Attachment #2: shadowtext_snippet.png --]
[-- Type: image/png, Size: 42500 bytes --]

[-- Attachment #3: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-09 18:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <030fe06a-f8fc-f7e6-015e-020348328a1d@freedom.nl>
2023-07-08  9:39 ` Fwd: Re: text width shadow background Hans Hagen via ntg-context
2023-07-08 11:07   ` Henning Hraban Ramm
     [not found]     ` <6c3569e3-411e-8cd9-912d-d318e822bb04@gmail.com>
2023-07-08 14:28       ` Henning Hraban Ramm
2023-07-09 13:49         ` Keith McKay
2023-07-09 15:56           ` Henning Hraban Ramm
2023-07-09 17:37             ` Hans Hagen via ntg-context
2023-07-09 18:50               ` Keith McKay
2023-07-06 19:27 Henning Hraban Ramm
2023-07-06 19:41 ` Henning Hraban Ramm
2023-07-08  6:55   ` Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).