As Joseph Wright and others have said in the comments, you need uppercase letters with \char
, so \char"2B45
.
There are other options as well. The LaTeX command \symbol{"2B45}
is essentially equivalent to \char
, and will always display the character at slot #x2B45 of the current font. The escape sequence ^^^^2b45
(which breaks the pattern by taking lowercase letters) is equivalent to entering the Unicode character ⭅ (U+2B45). If that character is active, this form will trigger the code for it.
Here is an extremely artificial example of how you might use both, to define a symbol that generates the math symbol in math mode, with correct operator spacing, or a symbol in text mode that matches the current text formatting.
Note that the first argument to \newunicodechar
should be the Unicode character itself, and it should generate a command to select the correct font and display the symbol from it.
\tracinglostchars=2 % Print a warning if a character is missing.
\documentclass{book}
\usepackage{newunicodechar}
\usepackage{unicode-math} % Or another package with \LLeftarrow, such as stix2
\usepackage[paperwidth=10cm]{geometry} % Solely to format a MWE on TeX.SX
\defaultfontfeatures{Scale=MatchLowercase}
\setmathfont{STIX Two Math}
\newfontfamily\symbolfamily{STIX Two Math}[
BoldFont = *,
BoldFeatures = {FakeBold = 1.05},
SlantedFont = *,
SlantedFeatures = {FakeSlant = 0.25},
BoldSlantedFont = *,
BoldSlantedFeatures = {FakeBold = 1.05, FakeSlant = 0.25}
]
\newunicodechar{^^^^2b45}% ⭅
{\ifmmode\LLeftarrow% In math-mode, use the math symbol
\else{\symbolfamily\symbol{"2B45}}% In text mode, change the font family
\fi}
\begin{document}
The ⭅ symbol can be used in math mode as \(a ⭅ b\). If we had a full font family
containing this glyph, we could write it as \textbf{bold ⭅},
\textsl{slanted ⭅}, or {\bfseries\slshape both ⭅}.
\end{document}
You need a suitable font eg with lualatex or xelatex
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Stix Two Math}
\begin{document}
$ A ⥁ B \cwcirclearrow C $
\end{document}
Best Answer
The font 'Noto Sans Egyptian Hieroglyphs - Regular' has placed its 1,071 glyphs in slots 77824 thru 78894 or, equivalently, slots
U13000
thruU1342E
. (To typeset all glyphs in a table, one needs 66 rows with 16 glyphs and 1 row with 15 glyphs.)Under either LuaLaTeX or XeLaTeX, one may use either
\symbol
or\char
to typeset the glyphs by their "number":To typeset the first glyph in the font file, one can write either
\symbol{77824}
or\symbol{"13000}
; to typeset the final glyph, one can write either\symbol{78894}
or\symbol{"1342E}
. (The"
character informs TeX that the number is written with hexadecimal-numeral notation.)Alternatively, if you prefer to use
\char
instead ofsymbol
, you'd write either\char77824
or\char"13000
for the first glyph and either\char78894
or\char"1342E
for the final glyph contained in the font file. Observe that the argument of\char
must not be enclosed in curly braces.Let's generate a practical example. To typeset the glyph "𓅮", you could peruse the table shown below and discover that the glyph is located in a row with row index
78176
and column index14
. Because78176+14=78190
, you could write\symbol{78190}
or\char78190
to generate the desired glyph. Naturally, you're free to write\symbol{"1316E}
or\char"1316E
if you prefer hexadecimal-numeral notation.Addendum: Overleaf permits the use of all
Noto
fonts -- includingNotoSansEgyptianHieroglyphs-Regular
-- under both XeLaTeX and LuaLaTeX. The following MWE (minimum working example)indeed runs fine on Overleaf, as the screenshot below confirms. (Just be sure to select XeLaTeX as the compiler from the "Menu" column and to load the
fontspec
package.)