In bold tikz text decoration |\bf| was mentioned as a possible way to insert a bolt tikz text decoration.
How to determine the width of a bold tikz text decoration?
I try:
\documentclass[margin=1cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% ...
\pgfmathsetmacro{\mywidth}{width("Some text")}
\pgfmathsetmacro{\mywidthb}{width("|\bf|Some bold text")}
%...
\end{tikzpicture}
\end{document}
The compilation encounters an error:
! Missing control sequence inserted.
<inserted text>
\inaccessible
l.7 ...ro{\mywidthb}{width("|\bf|Some bold text")}
The application of the width will be as in centre text exactly on an exactly specified point on path
\protected\def\mybold{\bfseries}and then\pgfmathsetmacro{\mywidthb}{width("|\mybod|Some bold text")}. – Henri Menke Jul 09 '19 at 10:17