# How to make Tikz use a font I've loaded in luatex?

I've got the following sample latex file I'm using with luatex:

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.text}

\begin{document}
\begin{tikzpicture}

\draw (0, 0) circle (3);

\path[%
decorate,
decoration={%
text along path,
text={The quick brown fox jumped over the lazy dogs.},
text align=center}
] (0, 3) arc (90:450:3);

\end{tikzpicture}
\end{document}


It gives me the following:

If I load a font using fontspec/setmainfont, how do I go about changing the font of the text that's displayed along the path?

And while I'm at it, is there a way to "lift" the text off the circle without having to manually calculate a smaller radius for the text arc? Is there some sort of yoffset parameter I can set?

• The raise key allows you to move the text up. – user121799 Nov 19 '18 at 4:30

I think if you set a font for the document, it will be used in these decorations. You can lift the path up by using the raise key.

\documentclass{standalone}

\usepackage{tikz}
\usepackage{fontspec}

\setmainfont{DejaVu Sans}
\usetikzlibrary{decorations.text}

\begin{document}
\begin{tikzpicture}

\draw (0, 0) circle (3);

\path[%
decorate,
decoration={%
raise=8pt,
text along path,
text={The quick brown fox jumped over the lazy dogs.},
text align=center}
] (0, 3) arc (90:450:3);

\end{tikzpicture}
\end{document}