latex is driving me batty -- ! Package fontspec Error: The font "DejaVu Sans" cannot be found.

Mojca Miklavec mojca at macports.org
Fri Sep 13 08:55:41 UTC 2019


On Fri, 13 Sep 2019 at 01:32, Ken Cunningham wrote:
>
> I'm working on making a newer bootstrap version of ghc for SnowLeopard.
>
> The ghc 8.0.1 build finishes on 10.6.8, but it wants to build the PDF documentation next, and texlive is erroring building the PDF.
>
> I know nothing about texlive. I know I might turn off the docs, but -- it took many hours to build ghc, and I would like to fix texlive.

Saying that texlive is driving you nuts is like saying that MacPorts
is giving you headaches when some buggy software is troubling you :)

TeX Live is just a collection of zillion binaries and packages.

I assume that the failure comes from XeTeX/XeLaTeX? (The only other
alternative I imagine would be LuaTeX. The font loading mechanisms
differ significantly between the two in some aspects, so that would be
an important piece of information.)

XeTeX supports specifying font names in two different ways:
- as file names (without extension)
- as actual font names (which may include spaces etc.)
The low level syntax is slightly different, but most importantly: when
you specify fonts by file name, they are searched for from the TEXMF
tree (i.e. files that are shipped with TeX Live).
When you specify font name, XeTeX uses fc-config to find that font
name, and unless fc-config is configured to look for files inside
texmf trees (or somewhere else where you have those fonts installed
and fc-config sees them), searching for font by name is not really
going to help much.

http://ctan.org/tex-archive/macros/latex/contrib/fontspec/fontspec.pdf

Your patch to replace font names by file names should work fine. If
you wanted font names to work out of the box, we might need to
properly configure fc-config.
It could also be that you are compiling with LuaTeX when the syntax
would only work with XeTeX, not sure.

Mojca


More information about the macports-dev mailing list