[Tex/LaTex] How to print a warning sign (triangle with exclamation point)

symbolsunicode

I am interested in including a triangle with an exclamation point (unicode #9888: ⚠) in a tex document. I've looked in the usual places (detexify, etc.) and not found this symbol. The document should be compilable with pdflatex and the source should have ASCII encoding. I already have a tikz version that I like reasonably well, given by

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\newcommand{\warningsign}{\tikz[baseline=-.75ex] \node[shape=regular polygon, regular polygon sides=3, inner sep=0pt, draw, thick] {\textbf{!}};}
\begin{document}
\warningsign Warning
\end{document}

so I am also requiring that the answer be an actual character, or at least not done using graphics.

Best Answer

The fourier package provides \danger:

\documentclass{article}

\usepackage{fourier}

\begin{document}

\danger

\end{document}

I sometimes find that some of the fourier commands conflict with other packages I use, so if I only want this symbol I do:

\documentclass{article}

\begin{document}

{\fontencoding{U}\fontfamily{futs}\selectfont\char 66\relax}

\end{document}

which is essentially what \danger does. This requires the futs font family which is provided with the fourier package, so the package must still be installed even though it's not actually being loaded.

If the futs font isn't available, the transcript will show the message:

LaTeX Font Warning: Font shape `U/futs/m/n' undefined
(Font)              using `U/cmr/m/n' instead on input line 5.

This means that the cmr font is being used instead, which has the letter B in the \char 66 slot.