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.

1 Answer 1

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.

1
  • 1
    Great answer. Could you add a link pointing to where things like \XeTeXcountglyphs and \XeTeXglyph are documented? Dec 7, 2011 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .