1

LaTeX n00b, so please forgive me if this is a stupid question.

I'm trying to follow the answer here: How to pick a specific symbol from a specific font?

My code is currently:

\newfontfamily\wingdingsfont[Path=C:/Windows/Fonts/, Extension=.ttf]{wingding}
\newcommand\wingdings[1]{{\wingdingsfont\symbol{#1}}}
...
\fonttable{wingding}

When I try to generate the file, I get the error:

! error:  (file C:/WINDOWS/Fonts/wingding.ttf) (type 2): there are no glyphs in
 the subset
!  ==> Fatal error occurred, no output PDF file produced!

The name of the font is correct (printed using -ls, and I don't get a font cannot be found error), but I've also tried Wingdings and wingdings.

C:\Windows\Fonts>ls -la
...
-rw-rw-rw-   2 user 0    82180 2019-03-19 05:44 wingding.ttf

If I try a different font - e.g. Inkfree.ttf, the file generates, and glyph table loads and displays correctly.

Am I including Wingdings wrong, or is there something I'm not understanding?

I'm on Windows 10, LuaTeX, Version 1.11.2 (MiKTeX 2.9.7250 64-bit)

Thanks

1 Answers1

2

wingdings is not unicode encoded. The glyph numbers are much higher than what font table expect. If you look in the lua you can see that the first glyph has the number 61472.

\documentclass{article}
\usepackage{expl3}

\begin{document}%
\raggedright
\font\myfont = "Wingdings"

\ExplSyntaxOn

\int_step_inline:nnn {61472}{61695}
 {
   \makebox[5em]{#1:\hfill \myfont\char#1}\quad
 }
\ExplSyntaxOff

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • That's done it, thanks! Do you mind me asking how you found those numbers though? I'm not sure what you mean by "look in the lua". For example, when I look at the font in Glyph Explorer, the telephone glyph (61480 above) is U+0028 - shouldn't that fall into the normal range for fonttable, and how do you find 61480? – divillysausages Mar 30 '20 at 20:22
  • 1
    When using lualatex it creates in the texmf-var in luatex-cache a lua file with informations about the font. – Ulrike Fischer Mar 30 '20 at 20:31
  • Excellent, thank you! I was also able to find it listed on fileformat.info: https://www.fileformat.info/info/unicode/font/wingdings/nonunicode.htm – divillysausages Mar 30 '20 at 20:39
  • Your answer is not working with XeTeX, is there any chance? – Qaher Oct 26 '20 at 09:03
  • 1
    @Qaher this here probably will work with wingdings too: https://tex.stackexchange.com/a/37418/2388 – Ulrike Fischer Oct 26 '20 at 09:07