I want to use phoenician letters (unicode range 0x10900 to 0x1091F) as variable names. (If your browser font supports them, these are the characters: 𐤂,𐤁,𐤀, and so on.)
I am using LuaTeX with unicode-math
, but the phoenician script is not supported.
I have two fonts installed on my system that have phoenician characters, but I cannot get them to show up in math mode.
Here is a minimal (non-)working example:
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\setmathfont{Noto Sans Phoenician}[range={"10900}]
\newcommand\alf{{\fontspec{Noto Sans Phoenician}𐤀}} % this is the literal aleph character
\begin{document}
Getting an \alf to show up in text is easy.
However, a math mode \(-\alf-\) does not work.
\end{document}
This produces no errors, but the following pdf output, because it tries to typeset the math mode aleph in latin modern, finds out that the font does not have it, and substitutes it with nothing.
The same happens with
\newcommand\alf{{\fontspec{Noto Sans Phoenician}\symbol{"10900}}}
and with
\usepackage{phoenician}
\newcommand\alf{{\phncfamily\MAaleph}}
I figured that since LaTeX does not understand that I want to use these as math symbols, I would make them math symbols via
\DeclareSymbolFont{phoenician}{T1}{phnc}{m}{n}
\Umathcode"10900=0 \csname symphoenician\endcsname\space "10900
which compiles fine and then of course does nothing because phnc is a T1 font and has nothing in the 0x10900 slot.
Is there some way for me to assign a math code to the symbols that phnc provides? Or is that simply not possible and I would have to design my own math font containing these glyphs?
Of course, there is always the hack of wrapping the symbol inside a \textup{}
, but as far as I understand, that messes with spacing. Is that correct?