[texhax] Accessing unusual Latin Modern glyphs in plain TeX

Karl Berry karl at freefriends.org
Wed Apr 22 00:37:29 CEST 2009

    Is there are relatively simple way to access some of the more
    unusual glyphs that are present in the Latin Modern fonts, but which
    don't seem to appear in the standard encodings?


(1) Find the TFM file with the glyph (the painful part, see below).
Let's call it foo.tfm.

(2) Run tex testfont, give it foo for the font name, type \table\end to
the * prompt.  Inspect the output to find the octal or hex location of
the glyph.  Let's call that number NN in hex.

(3) Say
\font\myfont = foo
\myfont \char"NN

Going back to finding the TFM file, if you want to do it visually, 
  cd /usr/local/texlive/2008/texmf-dist/fonts/tfm/public/lm  # or wherever
  ls *-lmr10.tfm
will show you all the lmr10.tfm's and you can run testfont on all of
them to see the complete repertoire.

Another way is to search for character names:
  cd /usr/local/texlive/2008/texmf-dist/fonts/map/dvips/lm/
  grep -i hook *

If your search is clever enough, this will show you which of the
encoding files lm-ENC.enc it's in, which you can then map back to the

I think a third way would be to open up
in (say) fontforge and look at it.  (It has essentially all the
available glyphs, I believe.)  Somewhere in there fontforge should be
able to tell you the glyph names, which you can then map back to a TFM
as above.

XeTeX and LuaTeX, which can read otf directly, also come to mind, but I
don't have a recipe.

Hope this helps,

More information about the texhax mailing list