How to typeset a loudspeaker icon?
fontawesome
provides a number of options:
\documentclass{article}
\usepackage{fontawesome}
\setlength{\parindent}{0pt}
\begin{document}
\faBullhorn \quad \verb|\faBullhorn| \\
\faVolumeOff \quad \verb|\faVolumeOff| \\
\faVolumeDown \quad \verb|\faVolumeDown| \\
\faVolumeUp \quad \verb|\faVolumeUp|
\end{document}
You're probably after \faVolumeUp
.
Here, I just string stuff together (e.g., \rule
, \blacktriangle
, and )
)... Works across different font sizes. EDITED to provide different volume settings with the syntax \loudspeaker[<volume>]
.
\documentclass{article}
\usepackage{amssymb,graphicx}
\newcommand\vcent[1]{\vcenter{\hbox{#1}}}
\newcommand\loudspeaker[1][3]{\ensuremath{\vcent{\rule{.6ex}{.6ex}}\kern-.5ex%
\vcent{\scalebox{.6}[1]{\rotatebox[origin=center]{90}{$\blacktriangle$}}}%
\ifnum#1>0\relax\kern.1ex\vcent{\scalebox{.3}{)}}\ifnum#1>1\relax\kern-.15ex%
\vcent{\scalebox{.4}{)}}\ifnum#1>2\relax\kern-.23ex\vcent{\scalebox{.5}{)}}%
\fi\fi\fi}%
}
\begin{document}
This is a loudspeaker: \loudspeaker.
This is volume 0: \loudspeaker[0].
This is volume 1: \loudspeaker[1].
This is a volume 2: \loudspeaker[2].
\LARGE LARGE loudspeaker: \loudspeaker.
\end{document}
Here is a variant with the sound waves in tt font:
\documentclass{article}
\usepackage{amssymb,graphicx}
\newcommand\vcent[1]{\vcenter{\hbox{#1}}}
\newcommand\loudspeaker[1][3]{\ensuremath{\vcent{\rule{.6ex}{.6ex}}\kern-.5ex%
\vcent{\scalebox{.6}[1]{\rotatebox[origin=center]{90}{$\blacktriangle$}}}%
\ifnum#1>0\relax\kern.05ex\vcent{\scalebox{.4}{\ttfamily)}}%
\ifnum#1>1\relax\kern-.4ex\vcent{\scalebox{.56}{\ttfamily)}}%
\ifnum#1>2\relax\kern-.55ex\vcent{\scalebox{.7}{\ttfamily)}}%
\fi\fi\fi}%
}
\begin{document}
This is a loudspeaker: \loudspeaker.
This is volume 0: \loudspeaker[0].
This is volume 1: \loudspeaker[1].
This is a volume 2: \loudspeaker[2].
\LARGE LARGE: \loudspeaker.
\end{document}
Compare, for example, to https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg, cited by the OP.
is U+1F4E2 so if you have a font that shows this (eg if you can see the symbol at the start of this line in your browser) then you can use it directly from xetex or luatex, eg
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Segoe UI Emoji}
\begin{document}
--- ---
\end{document}