Text edge and shadow with tikz

I have this code:

\documentclass[twoside,fleqn]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[most]{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{patterns}
\begin{document}
\begin{tcolorbox}
\node[text width=15cm,text=transparent!20]{\fontsize{35}{60}\bfseries My title\\};\end{tikzfadingfrompicture}
\begin{tikzpicture}
top color=red,
bottom color=yellow]{\fontsize{35}{40}\sffamily\bfseries My title\\};
\end{tikzpicture}
\end{tcolorbox}
\end{document}


Now I wanted to add a black edge and a shadow to the text, how can I do? The following is an example.

• In addition to completing the code, could you clarify what you are trying to do? You say you want to add an edge. Then you say you want to get rid of an edge between the grey and black. But there's nothing between the grey and black, is there? If I complete your code in a standard way, the result is nothing like the picture you've posted.
– cfr
Apr 26, 2016 at 21:00
• I don't believe tikz is geared up for font effects. First you would have to create a "font" of tikz shapes, then apply all the usual tricks to these shapes. Apr 26, 2016 at 21:15
• there is another edge in the image but I don't want it. check closely. Apr 27, 2016 at 11:50

\documentclass{article}
\usepackage{tikz}
\usepackage{pdfrender}
\usepackage{xcolor}

\begin{document}

\begin{tikzpicture}

\node[opacity=.2] at (0.1,-0.1) {
\scalebox{2}{\texttt{%
\textpdfrender{%
TextRenderingMode=2,
LineWidth=.1ex,
StrokeColor=darkgray!50,
FillColor=darkgray!50,
}{\Huge Hello World}}}
};
\node at (0,0) {
\scalebox{2}{\texttt{%
\textpdfrender{%
TextRenderingMode=2,
LineWidth=.1ex,
StrokeColor=blue!30!black,
FillColor=orange!90,
}{\Huge Hello World}}}
};

\end{tikzpicture}
\end{document}


• Worked great for me! Thanks a lot. However, I would use \node [font=\ttfamily,scale=2] at (0,0) {\textpdfrender{... instead of the \scalebox and \texttt. Jan 31, 2019 at 12:03
• @MartinScharrer Good point Martin, you're right. I hope to have enough strength soon to program a little again Feb 1, 2019 at 10:31