I want to add some custom font into my latex build process in macOS 13.3, this is the command I am using right now:

    Path = { /Users/xiaoqiangjiang/.fonts/ },
  Extension = .otf ,
  BoldFont = HelveticaNeueLTPro-Md.otf ,

when I using the full path like this /Users/xiaoqiangjiang/.fonts/, it works fine. But when I replace the path to ~/.fonts/, the texstudio shows could not found the fonts. Does the setmainfont command path support the ~? what should I do to fixed this issue?

  • why I replace the user path with ~, the xelatex could not found the fonts when compile?
    – Dolphin
    Jun 15 at 13:25
  • 3
    sorry I meant no, you can't use ~. Install the fonts so that your system can find them, then xelatex and lualatex will find them too. Jun 15 at 13:27

1 Answer 1


No, you can't use ~ for home, but you can use \string~.




{\fell Hello}


I found a rarely used font in some working directory. Here's the console output about the font (username masked), with LuaLaTeX


So you see it works. I also tested XeLaTeX with success.

You must log in to answer this question.

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