# Easiest way to create TeX macro/code to access symbols from particular font?

It's really not hard to do, but it would make sense to make it a package.

## Update

I've now packaged this as a package with command names for all the keys. It is now on CTAN. Since I don't use the calculator, suggestions are welcome for more appropriate names for some of the keys. You can submit them at https://github.com/amunn/casiofont/.

## Sample document

Here's a sample document. Fonts are embedded by default so any viewer should be able to view the resultant file.

\documentclass{article}
\usepackage{casiofont}
\begin{document}
{\casio \Shift\Alpha\UpArrow\DownArrow\LeftArrow\RightArrow}

\textcasio{\UpArrow}
\end{document}


You can call the glyphs by number rather than “by character”. With the following code we can gather the number of each glyph in the font:

\documentclass{article}
\usepackage[a4paper,margin=2cm,heightrounded]{geometry}
\usepackage{fontspec}
\usepackage{multicol}

\newfontface{\casio}{CASIO ClassWiz}[
Extension=.ttf,
Path=./ClassWizSeriesFontSet/,
]

\begin{document}

{\casio\xdef\casiofont{\the\font}}

\begin{multicols}{4}
\count255=32

\loop\ifnum\count255<"10FFFF
\iffontchar\casiofont\count255 \the\count255\ {\casio\char\count255}\endgraf\fi
\repeat

\end{multicols}

\end{document}


For your document you can look up the characters you need and define

\newfontface{\casio}{CASIO ClassWiz}[
Extension=.ttf,
Path=./ClassWizSeriesFontSet/,
]


(if you install the font system wide, you don't need those options, of course; otherwise, adjust the path).

Next, assign macros to the glyphs you need:

\newcommand{\casiosymbol}[1]{{\normalfont\casio\symbol{#1}}
\newcommand{\CLeft}{\casiosymbol{33}}
\newcommand{\CEquiv}{\casiosymbol{34}}
\newcommand{\CFactorial}{\casiosymbol{37}}


You can improve the list at any time.