# fontspec (xelatex) finding fonts by name, installed or in TEXMFHOME

This is related to my other question: fontspec search path in TEXMFHOME

I'm trying to write a package using a specific opentype font through fontspec.

Using TeXLive 2013 on a Debian computer (a fellow confirms the same behaviour for Mac OS X) I see the following behaviour:

• Font installed as system font (in ~/.fonts):
lualatex finds it by its font name and its file name
xelatex finds it by its font name but not by its file name
• Font installed in TEXMFHOME (~/texmf/fonts/opentype/FONT/):
lualatex finds it by its font name and its file name
xelatex finds it by its file name but not by its font name

Is it really true that xelatex (TeXLive on Linux/Mac at least) does find files only by font name when installed as system font and only by file name when installed in the texmf tree? Or am I missing something?

And if that's true could someone please tell me if it's the same on Windows/other TeX distros?

I'm interested in a most generic answer because I will have to tell the user (for arbitrary OS/distro combinations) where to copy (or link) the font folder after downloading the package.

-
On linux it depends on their fontconfig configuration (which is not under the control of texlive). See tug.org/texlive/doc/texlive-en/texlive-en.html#x1-340003.4.4. On windows fontconfig is under control of the texsystem (TL and miktex) and normally "everything works". But be careful with xelatex: it doesn't like if if a font exists twice on a system. –  Ulrike Fischer Sep 12 '13 at 8:28
Does this mean: if I would follow these directions and make fontconfig also look into the TEXMFHOME folders I could also find a font by name that is located in TEXMFHOME? And would this also work the other way round, i.e. finding a system font by filename? –  uli_1973 Sep 13 '13 at 9:14
I don't know, I don't have linux. I only know that fontconfig is used to find fonts. (But I'm not sure what xetex does exactly if you give a filename). –  Ulrike Fischer Sep 13 '13 at 9:27