symbols – Changing Unicode Font for a Single Symbol in LaTeX

symbolsunicode

I am trying to get the "Bourbaki" symbol (dangerous bend U+2621).
I use latin modern font which doesn't have this symbol, so I tried this (changing the font in STIX):

\documentclass[10pt,a4paper,french]{article}

\usepackage{babel}
\usepackage[warnings-off={mathtools-colon,mathtools-overbracket},math-style=french]{unicode-math}

    \usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}
    
    \NewDocumentCommand{\bourbaki}{}{{\setmainfont{STIX two Text}\symbol{"2621}}}
    
    
    \begin{document}
        \bourbaki
    \end{document}

It doesn't work because in the log file, I get:
Missing character: There is no ☡ (U+2621) in font STIXtwoText:mode=node;script
=latn;language=dflt;+tlig;!

How could I get the symbol?

Best Answer

As far as I can tell, STIX Two Text doesn't have the glyph, but STIX Two Math has it.

Since there is no law that requires math fonts to be exclusively used for math, you just define a suitable font face.

\documentclass[10pt,a4paper,french]{article}
\usepackage{babel}
\usepackage[scale={0.75,0.8},footskip=1.5cm,heightrounded]{geometry}

\usepackage[
  warnings-off={mathtools-colon,mathtools-overbracket},
  math-style=french
]{unicode-math}

\newfontface{\STIXTWO}{STIX Two Math}

\NewDocumentCommand{\bourbaki}{}{\mbox{\STIXTWO\symbol{"2621}}}

\begin{document}

\bourbaki

\end{document}

enter image description here

Related Question