Custom glyph is not displayed properly
Why clipping? Just draw an arc!
\documentclass[a4paper, 12pt]{extreport}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{positioning}
\newcommand{\foo}[1][]{%
\begin{tikzpicture}[#1]%
\draw (0,0) arc(180:0:1.5ex);
\end{tikzpicture}%
}
\begin{document}
I love \verb|\foo| \foo
\end{document}
EDIT
I found out about the knots
package. Have you tried it? It seems to produce exactly what you want. Type texdoc knots
in the terminal for further info (or use CTAN)
BACK TO THE QUESTION
So, you have to extend the clipping area, in order to accomodate the line stroke.
I changed:
\clip (-1.58ex,0.01) rectangle (1.6ex,1.6ex);
So:
\documentclass[a4paper, 12pt]{extreport}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{positioning}
\newcommand{\foo}[1]{%
\begin{tikzpicture}[#1]%
\begin{scope}
\clip (-1.58ex,0.01) rectangle (1.6ex,1.6ex);
\draw (0,0) circle(1.5ex);
\end{scope}
\end{tikzpicture}%
}
\begin{document}
I love \verb|\foo| \foo{}
\end{document}
Yields: