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

2
  • Hi, welcome to TeX! Consider posting a piece of code available to run with or without errors. Have a nice day! :D Mar 30, 2020 at 0:59
  • @SebastiánV.Romero thanks :) I tried posting just the relevant parts; I'm not at the point where I can pare down what I have to a minimal example Mar 30, 2020 at 20:23

1 Answer 1

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

5
  • 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? Mar 30, 2020 at 20:22
  • 1
    When using lualatex it creates in the texmf-var in luatex-cache a lua file with informations about the font. Mar 30, 2020 at 20:31
  • Excellent, thank you! I was also able to find it listed on fileformat.info: fileformat.info/info/unicode/font/wingdings/nonunicode.htm Mar 30, 2020 at 20:39
  • Your answer is not working with XeTeX, is there any chance?
    – Qaher
    Oct 26, 2020 at 9:03
  • 1
    @Qaher this here probably will work with wingdings too: tex.stackexchange.com/a/37418/2388 Oct 26, 2020 at 9:07

You must log in to answer this question.

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