0

After researching this for a while, as well as coming across this answer, I'm left confused.

Is the the approach of having to hard-link a font

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont[Path=/Users/herrbischoff/Library/Fonts/]{Geomanist-Regular.otf}
\begin{document}
Hello World!
\end{document}

really the only way to get XeLaTeX to recognize the fonts in the user folder? The above example works as is.

However, when I try to use them as shown in most guides, either using the family name

\setmainfont{Geomanist}

or the Postscript name

\setmainfont{Geomanist-Regular}

always yields the error

! Package fontspec Error: The font "Geomanist" cannot be found

or

! Package fontspec Error: The font "Geomanist-Regular" cannot be found

respectively.

I cannot imagine it to be the only solution as it feels very clumsy. System fonts can be used as expected but not the ones in the user folder /Users/<user>/Library/Fonts, which is where FontBook.app installs fonts to and has been the default folder for user fonts on macOS for 20+ years now.

Any ideas how I can permanently include all fonts from the user folder for use in my TeX documents?

3
  • 1
    Extension=.otf ... Please google without mac request
    – koleygr
    Nov 6, 2022 at 22:43
  • @koleygr, this doesn't answer my question at all. And yes, I usually Google without Mac specifics first. It's not a question of missing extension but of having to specify the path in every document. My question is if having to specify a font path in the document is the only way to make things work. My first example works as is for me. Nov 6, 2022 at 22:48
  • I don't have a mac but try tex.stackexchange.com/q/461396/2388 Nov 7, 2022 at 7:34

1 Answer 1

1

I assume the Geomanist-Regular.otf font is in your ~/Library/Fonts folder as suggested in your call above. First: there is no need to give that path since xetex gets the fonts by name from the OS. If it appears in Font Book it will be found by the font name given there. To use fonts that are not in standard locations used by the OS, e.g., fonts supplied by you TeX Distribution, you need to give the file name rather than the font name.

I hope this helps.

3
  • Thanks. The entire point of my question is that the behaviour you describe does not work for me. I take from your response that it should work but doesn't. In that case, I'm very interested in troubleshooting options. Nov 17, 2022 at 18:09
  • @herrbischoff : what part(s) of the answer above doesn't work? Nov 17, 2022 at 20:13
  • Leaving the path name out results in the given error message. You claim it should work. The fonts are not found when they apparently should. I stated as much in my question. At this point, I'm unsure about how I can be any clearer. Nov 17, 2022 at 21:15

You must log in to answer this question.

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