13

Is it possible to use the character set available in the "Webdings" OpenType font which is installed on my PC using XeLaTeX? Other non-symbol fonts seem to work fine, but I just get boxes for every character I try in this font, and other symbol fonts like Wingdings etc.

topskip
  • 37,020
Dan
  • 1,475
  • 2
  • 16
  • 20

1 Answers1

23

Webdings is not Unicode encoded. With such fonts \char often fails. You can use \XeTeXglyph instead (the whiledo-loop generate a tabular which shows you which values to use):

\documentclass{article}
\usepackage{ifthen}

\begin{document}%
\raggedright
\newcounter{glyphcount}
\setcounter{glyphcount}{0}
\font\myfont = "Webdings"

{char:  \myfont \char50}

{xetexglyph: \myfont \XeTeXglyph50}


\whiledo
{\value{glyphcount}<\XeTeXcountglyphs\myfont}
{\arabic{glyphcount}:~%
{\myfont\XeTeXglyph\arabic{glyphcount}}\quad
\stepcounter{glyphcount}}
\end{document}

See XeTeX Reference Guide for \XeTeXglyph and \XeTeXcountglyphs.

Leo Liu
  • 77,365
Ulrike Fischer
  • 327,261