13

The documentation of luaotfload states that on Linux fontconfig is used to find the font locations. However all fonts I install in /usr/share/local/fonts edit: /usr/local/share/fonts(as I don't want to mess up my package management) are not visible to luaotfload, but to all other applications in my system which also use fontconfig. How do I tell luaotfload where to look for fonts?

I’m using TeXLive 2012 included in Ubuntu.

1

4 Answers 4

5

This requires a bit of debugging... Do you have a /etc/fonts/fonts.conf that references these fonts? It might be quite important as the code of luaotfload relies on this file. If it doesn't work on your system, it might be because of an update in fontconfig files which makes luaotfload code needing an update... If you want, I would be ready to debug it if you provide me a teamviewer or ssh access...

EDIT: this is indeed in relashionship with the debian bug. Actually it's more a bug in luaotfload than in debian or texlive. I'll fix it in the next version, on CTAN today or tomorrow.

2
  • This is a snippet from fonts.conf cat /etc/fonts/fonts.conf | grep /usr/local/ <dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/usr/local/share/fonts</dir> So it is there in the fontconfig files. Other applications are able to use the fonts in /usr/local/share/fonts/ Commented Apr 25, 2013 at 10:39
  • But it looks like i stumbled across the bug in Debian/Ubuntu mentioned above. So I’m gonna install vanilla TeXLive on my notebook when version 2013 comes out. Commented Apr 25, 2013 at 11:37
12

The environment variable OSFONTDIR will override fontconfig information. Specifying directories with a double trailing slash means "please recurse into subdirectories". For example:

OSFONTDIR=${HOME}/.fonts:/usr/share/fonts//:/usr/share/texmf/fonts//

EDIT: There seems to be an issue with Debian (and thus Ubuntu) texlive packaging, which provides a default value of /usr/share/font for OSFONTDIR, meaning that fontconfig support is never invoked.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683943

3
  • 2
    Welcome to TeX.sx! Commented Apr 24, 2013 at 17:46
  • Thanks! But will it override all settings or will it just add the paths specified? And why doesn’t luaotfload use the paths in my fontconfig configs? Commented Apr 24, 2013 at 20:53
  • 2
    @TobiasSchula This adds to the existing paths.
    – egreg
    Commented Apr 25, 2013 at 9:24
9

put it into /usr/local/share/fonts/ or alternatively into your home directory into .fonts/.

Run mkluatexfontdb -v | grep "local/share" to see what's going on.

4
  • As I stated above, I already put my fonts in usr/local/share/fonts mkluatexfontdb -v | grep "local/share" outputs nothing, because luaotfload isn’t looking in the local font directory. However, it looks like it has something to do with ubuntu’s packaging. On my desktop, where I installed vanilla TeXLive, the fonts in local font dir are getting loaded. Commented Apr 24, 2013 at 20:46
  • 1
    @TobiasSchula: Your questions says your fonts are in /usr/share/local, while they should be in /usr/local/share. Please read man hier Commented Apr 26, 2013 at 20:08
  • @MartinSchröder: I’m sorry, that was a typo. Of course the fonts are in /usr/local/share/ In fact, that’s also the path kde puts them when I choose to install them globally. I didn’t want to offend anyone. Commented Apr 26, 2013 at 22:39
  • @TobiasSchula: No harm done. :-) Commented Apr 26, 2013 at 22:46
0

The issue appears that fontconfig seems to automatically look in /usr/local/share/fonts without this being explicitly specified in the configuration. However luaotfload doesn't use fontconfig but loads the config directly. As such it will not look in this implicit location.

1
  • Evidence? It is in /etc/fonts/fonts.conf on my system with a big banner above saying 'DO NOT EDIT THIS FILE.'
    – cfr
    Commented Apr 27 at 0:12

You must log in to answer this question.

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