12

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.

20

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.

| improve this answer | |
  • Great answer. Could you add a link pointing to where things like \XeTeXcountglyphs and \XeTeXglyph are documented? – Brent.Longborough Dec 7 '11 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.