[Tex/LaTex] How to make a glowing text

decorationstikz-pgftikz-styles

I'd like to achieve such a result, like when you apply a glowing effect to a text in an image editor.
enter image description here


As I am already using tikz package in my document, it would be prefferable to use tikz's library.

I found out, that there is a shadows.blur one which would create a soft shadow. Then I would shift it so that it looks like a glowing effect.

However, unfortunately, this attempt makes a rectangle rather than the text's shadow.

\documentclass[12pt]{article}

\usepackage{tikz}
\usetikzlibrary{shadows.blur}

\begin{document}

\begin{tikzpicture}
\node[preaction={blur shadow={shadow xshift=-.5mm,shadow yshift=.5mm}}] at (1,1) {Test};
\end{tikzpicture}

\end{document}

enter image description here

Best Answer

You could use a combination of tikz and contour package.

\documentclass[12pt,border=12pt]{standalone}
\usepackage[outline]{contour}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
\def\mycontour#1{\textcolor{black}{\contour{green!20}{#1}}}
\node (1) at (0cm, 0cm) {};
\node (2) at (2cm,0cm) {};   
\draw[
decoration={text effects along path,
text={Text},
text align=center,
text effects/.cd,
text along path, scale text to path,
characters={font=\Huge,character command=\mycontour},
},decorate,
]  (1) to (2);
\end{tikzpicture}
\end{document}

or just

\documentclass{article}
\usepackage{xcolor}
\usepackage[outline]{contour}
\contourlength{1pt}
\contournumber{27}
\newcommand{\mycontour}[2][green!20]{\textcolor{black}{\contour{#1}{#2}}}
\begin{document}
\Huge\mycontour{Text}
\end{document}

enter image description here