# Extracting LaTeX symbols as fonts

I would like to have the Latex mathematical symbols available as a vector-font (say TrueType), together with a mapping from Latex symbol-names to code-points in the font. How can I achieve this?

## Background

For my research, I need access to high-quality images of all Latex (mathematical) symbols. I have set up a tool-chain which provides me these images; Symbol-to-PDF by pdflatex -> PDF-to-PNG by GhostScript -> PNG-to-cropped-PNG by NConvert. I use these images in my software.

However, this is somewhat backwards, since many of the symbols in Latex are defined as vector-shapes. If I had direct access to these vector-shapes, I could have less of memory foot-print and also draw the symbols at an arbitrary resolution.

• You might find this answer interesting as a starting point: I explained how I extracted a single glyph (a symbol, a character) from a document to an `eps` document. – Clément Feb 17 '16 at 19:22
• all the fonts commonly used in TeX are already available in scalable type1 truetype or opentype forms. for example you could use an opentype font such as xits-math or latin-modern math which will have all the common latex and ams symbols in a single scalable font. – David Carlisle Feb 17 '16 at 22:22

All the fonts commonly used in TeX are already available in scalable type1 truetype or opentype forms.

For example you could use an opentype font such as xits-math or latin-modern math which will have all the common latex and ams symbols in a single scalable font.

The unicode-math package has a mapping of command names that applies to any opentype math font see

``````texmf-dist/tex/latex/unicode-math/unicode-math-table.tex
``````

which is a long list that looks like

``````...
\UnicodeMathSymbol{"02197}{\nearrow         }{\mathrel}{ne pointing arrow}%
\UnicodeMathSymbol{"02198}{\searrow         }{\mathrel}{se pointing arrow}%
\UnicodeMathSymbol{"02199}{\swarrow         }{\mathrel}{sw pointing arrow}%
...
``````

which maps the Unicode code point, a tex command name, and math class and the Unicode name.