Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 14 down vote accepted

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.

share|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
    
Thank you Joseph! –  Dan Dec 7 '11 at 19:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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