# Contour AND drop shadow for text

I have this code:

\documentclass[]{memoir}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{contour}
\contourlength{.4pt}
\usepackage{contour}

\begin{document}
\end{document}


I need to add a contour to the text as well, but it won't compile no matter where I put in the \contour{} command. Please note that I use xelatex.

Help?

\documentclass[]{memoir}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{contour}
\contourlength{.4pt}
\usepackage{contour}

\begin{document}
\end{document}


Works for me. It complains, but apparently still renders the result you're looking for (I think).

EDIT: To be clear, run

xelatex -interaction=batchmode -halt-on-error <yourfile>

to compile.

• Hurm, xelatex -interaction=batchmode -halt-on-error mwe.tex gives me no output files? EDIT: It appears it gives me mwe.log and mwe.aux but no PDF files. – Kristian Nordestgaard Aug 10 '17 at 18:41
• EDIT 2: Appears I can just plow through with plain xelatex. Odd. – Kristian Nordestgaard Aug 10 '17 at 18:49

I had to do \shadowtext{\contour{... to get it to work. The other way round relaxed the offsety parameter, leaving it undefined for shadowtext after contour did its multiple font shape iterations.

Removed resizebox as well since it pixellated a lot, so used scaling instead, for smoother lines.

General font effects are possible with those two packages:

MWE

\documentclass{article}
\usepackage[svgnames]{xcolor}
\usepackage{fontspec}
\setmainfont{Noto Serif}[Scale=3]
\usepackage{contour}

\begin{document}
\contourlength{1.4pt}
\Huge
\contour[32]{yellow}{%
\textbf{\uppercase{the test}}
}%
}%

\bigskip

\contourlength{0.4pt}
\color{yellow}
\Huge
\contour[24]{red}{%
\textbf{\uppercase{the test}}
}%
}%

\bigskip

\contourlength{0.8pt}
\color{Magenta}