# \blacktriangle not showing if unicode-math included

Following example shows only the square and lozenge (XeTeX, Version 3.14159265-2.6-0.99998) the other three symbols being shown as spaces whereas if unicode-math is removed, the symbols are shown correctly. Is there a way to show the symbols correctly whilst using unicode-math?

\documentclass{article}

\usepackage{amssymb}
\usepackage{unicode-math}

\begin{document}
$$a\blacksquare \blacklozenge \blacktriangle \blacktriangledown \bigstar b$$
\end{document}


I wouldn't mix amssymb with unicode-math.

You can supply the missing glyphs from another math font.

\documentclass{article}

\usepackage{unicode-math}

\setmathfont{Latin Modern Math}
\setmathfont{STIX Two Math}[
range={\mdlgblklozenge,\mdblksquare,\blacktriangle,\blacktriangledown,\bigstar}
]

\providecommand{\blacksquare}{\mdblksquare}
\providecommand{\blacklozenge}{\mdlgblklozenge}

\begin{document}

$a\blacksquare \blacklozenge \blacktriangle \blacktriangledown \bigstar b$

\end{document}


There are smaller variants; it makes sense to load also them and then decide about the size at the end.

\documentclass{article}

\usepackage{unicode-math}

\setmathfont{Latin Modern Math}
\setmathfont{STIX Two Math}[
range={
\mdlgblklozenge,
\smblklozenge,
\mdblksquare,
\smblksquare,
\blacktriangle,
\blacktriangledown,
\bigstar,
},
]

\providecommand{\blacksquare}{\smblksquare}
\providecommand{\blacklozenge}{\smblklozenge}

\begin{document}

$a\blacksquare \blacklozenge \blacktriangle \blacktriangledown \bigstar b$

\end{document}


You're not tied to using math fonts for specific symbols. For instance, you might resort to a standard font supplying them.

\documentclass{article}

\usepackage{amsmath}
\usepackage{unicode-math}

\newfontface{\altfont}{FreeSerif}

\AtBeginDocument{%
\providecommand{\blacksquare}{\text{\altfont\symbol{"25A0}}}%
\providecommand{\blacklozenge}{\text{\altfont\symbol{"29EB}}}%
\renewcommand{\blacktriangle}{\text{\altfont\symbol{"25B2}}}%
\renewcommand{\blacktriangledown}{\text{\altfont\symbol{"25BC}}}%
\renewcommand{\bigstar}{\text{\altfont\symbol{"2605}}}%
}

\begin{document}

$a\blacksquare \blacklozenge \blacktriangle \blacktriangledown \bigstar b$

\end{document}


The log shows

Missing character: There is no ▴ in font [latinmodern-math.otf]/OT:script=math;
language=DFLT;!
Missing character: There is no ▾ in font [latinmodern-math.otf]/OT:script=math;
language=DFLT;!
Missing character: There is no ★ in font [latinmodern-math.otf]/OT:script=math;
language=DFLT;!


so the font doesn't contain these characters. You could try a different main font, or define these to come from the ams fonts

For example I get

\setmathfont{Stix Two Math}

• I tried but couldn't find the right result. +1. I have tried with \setmathfont{texgyrepagella-math.otf} Apr 7 '19 at 9:06
• @Sebastiano - Give XITS Math and Stix Two Math a try.