I am trying to create a custom word, f-hole, where instead of an f I use the actual outline of a violin f-hole:
I have an .svg file of the outline I want to make into a symbol, and using this answer I've managed to use \usetikzlibrary{svg.path} to include it in a tikzpicture. From there I've manually adjusted the size and position to make it sit next to the piece of text -hole. However, I'm having trouble getting it to align with the baseline of my text and get punctuation to work around it (before and after the word).
Additionally, my solution doesn't scale nicely when I change the size of the font (I need it to work with footnotesize and huge at a minimum). Any tips to improve this? I need a pdfLaTeX solution.
Code
\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{newtxtext}
\usepackage{tikz}
\usetikzlibrary{svg.path}
\tikzset{
fhole/.pic={
\fill [scale=0.045] svg{m141.50504652572636,8.750154755020048 l12.88491,15.0039 c-6.33974,5.397 -6.91986,11.7233 -3.91811,17.7654 c2.79858,4.7279 9.39378,6.1777 14.58215,3.3698 c14.90229,-8.6016 2.97205,-29.2657 -8.32413,-35.8434 c-12.46952,-7.671 -23.48465,-2.9727 -32.06999,2.2816 c-32.57131,21.0958 -31.29905,53.0495 -36.53204,111.7787 l-3.80143,2.2686 l3.46803,2.8209 c-1.81268,50.3552 -7.19548,108.8638 -47.31312,118.9301 l-13.70647,-17.533 c6.63203,-1.8678000000000003 11.01697,-7.1683 12.24781,-13.0208 c1.58418,-12.036 -9.34214,-23.7985 -23.61721,-18.9647 c-14.27507,4.8337 -12.70367,27.7181 -1.47322,39.9927 c11.23043,12.2746 28.2174,15.8516 42.3734,10.8362 c41.92159,-16.3793 51.61678,-67.3469 52.89911,-111.1003 l3.68819,-2.1338 l-3.4807,-3.4122 c2.6751,-40.5983 -4.97189,-105.0606 32.09282,-123.0397 z};
}
}
\newcommand\fhole{\begin{tikzpicture}
\path (0,0) pic [yscale=-1] {fhole};
\node at (0.64,-0.17) {-hole};
\end{tikzpicture}}
\begin{document}
The violin \fhole.
\footnotesize The footnotesize violin \fhole.
\huge The huge violin \fhole.
\end{document}





\hugeare switches and don't take arguments. – samcarter_is_at_topanswers.xyz Jul 04 '18 at 15:15