Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Btw: Welcome to TeX.sx! –  Martin Schröder Apr 26 '13 at 22:48
add comment

3 Answers 3

up vote 5 down vote accepted

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.

share|improve this answer
    
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/ –  Tobias Schula Apr 25 '13 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. –  Tobias Schula Apr 25 '13 at 11:37
add comment

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

share|improve this answer
2  
Welcome to TeX.sx! –  Peter Jansson Apr 24 '13 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? –  Tobias Schula Apr 24 '13 at 20:53
1  
@TobiasSchula This adds to the existing paths. –  egreg Apr 25 '13 at 9:24
add comment

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.

share|improve this answer
    
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. –  Tobias Schula Apr 24 '13 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 –  Martin Schröder Apr 26 '13 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. –  Tobias Schula Apr 26 '13 at 22:39
    
@TobiasSchula: No harm done. :-) –  Martin Schröder Apr 26 '13 at 22:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.