3

I've downloaded an .otf font (specifically one called Dalelands Uncial) that I would like to use in a document. I've double-clicked on the file and selected install, so that it now sits in my ~/Library/Fonts folder on my Mac and Font Book claims the file is installed.

I thought that running LuaLaTeX on the following minimal example would now allow me to access the font, but it doesn't work.

\documentclass{article}
\usepackage{fontspec}
\setmainfont[
    Path = /Users/<myname>/Library/Fonts,
    Extension = .otf,
    Ligatures = TeX
]{Dalelands Uncial}
\begin{document}
Some sample text.
\end{document}

(This is my attempt to replicate what is suggested in the first answer to this question.)

I'm told that "DalelandsUncial" cannot be found. Is it the space in the name causing a problem?

Martyn Quick
  • 549
  • 3
  • 13
  • 1
    Try Dalelands_Uncial – yannisl Nov 22 '14 at 17:11
  • 1
    It shouldn't be necessary to specify either the path or the extension if the font has been installed. But as indicated by Yiannis, the mistake must be in the {Dalelands Unical} part. – Sverre Nov 22 '14 at 17:16
  • Do you have an up-to-date Texlive 2014? If not a manual run of luaotfload-tool --update might be necessary – MaxNoe Nov 22 '14 at 17:51
  • Tried those: "Dalelands_Uncial" gives the same error. Also just ran luaotfload-tool --update and I still get the same error. – Martyn Quick Nov 22 '14 at 18:08
  • You definitely don't need the path and the extension. Open Font Book, select the font and hit Command-I: what does it list next to "Family"? – egreg Nov 22 '14 at 18:28
  • Does luaotfload-tool --fuzzy --find=DalelandsUncial return anything? In the past I have found that XeTeX and LuaTeX expect different names for the same font. Does the file name match the 'internal' name? Try, e.g., otfinfo -i <fontfile>.otf – jon Nov 22 '14 at 18:31
  • 2
    I have downloaded the font from http://www.dafont.com/it/dalelands.font and installed it in ~/Library/Fonts. Your document, after removing Path=... and Extension=... compiles without problems (LuaTeX triggers a run of luaotfload-tool the first time). – egreg Nov 22 '14 at 18:36
  • Ok - thanks all so far. I'm beginning to conclude there is something wrong with my installation/setup. When I run luaotfload-tool --fuzzy --find=DalelandsUncial, it claims it can find the file, but refers to a directory that I first tried putting it in, before I came across the above answer that I linked to. This folder doesn't even exist any longer, so I guess I need to do some updating of the database? I've tried sudo luaotfload-tool -f -u but that doesn't seem to have made any difference. – Martyn Quick Nov 22 '14 at 18:51
  • I've tried adding another named font to see what happens. I downloaded the font, double-clicked it, installed it into ~/Library/Fonts and then removed the original file. luaotfload-tool can't find it. My conclusion is that this is not searching my Fonts folder. How do I tell it to look here? (And how do I diagnose where it actually is looking?) – Martyn Quick Nov 22 '14 at 19:29
  • I also have a problem under Windows 7: I can use the font with XeLaTeX, and same problem with LuaLaTeX. – Bernard Nov 22 '14 at 22:19

1 Answers1

1

With further experimentation, I have now found an answer that works for TeXlive as installed on my machine. I have no idea why this one works for me, but the one that works for @egreg does not.

It turns out that all I needed to do was put the .otf files in a subdirectory of ~/Library/texlive/2014/texmf-var/fonts and they can then be found by LuaLaTeX.

Martyn Quick
  • 549
  • 3
  • 13