[lltx] debugging when luaotfload can't find fonts

Khaled Hosny khaledhosny at eglug.org
Sun Sep 26 18:14:55 CEST 2010


On Mon, Sep 27, 2010 at 01:36:52AM +0930, Will Robertson wrote:
> Hi,
> 
> I'm having trouble loading fonts and I don't know how to debug the problem.
> 
> My otfl-names.lua cache contains, for example,
> 
> >   {
> >    ["familyname"]="XB Zar",
> >    ["filename"]={ "/Users/will/Library/Fonts/XB Zar/XB Zar.ttf", false },
> >    ["fontname"]="XBZar",
> >    ["fullname"]="XB Zar",
> >    ["names"]={
> >     ["family"]="XB Zar",
> >     ["fullname"]="XB Zar",
> >     ["psname"]="XBZar",
> >     ["subfamily"]="Regular",
> >    },
> >    ["size"]={},
> >    ["slant"]=0,
> >    ["weight"]=400,
> >    ["width"]=5,
> >   },
> 
> 
> and yet when I run
> 
> > \documentclass{article}
> > \usepackage{fontspec}
> > \begin{document}
> >   \huge
> >   \fontspec[Script=Arabic,Numbers=Arabic]{XB Zar}
> >   test
> > \end{document}
> 
> 
> I get the following:
> 
> > luaotfload | Font names database loaded: /Users/will/Library/texlive/2010/texmf
> > -var/luatex-cache/generic/names/otfl-names.lua(load: /Users/will/Library/texliv
> > e/2010/texmf-var/luatex-cache/generic/fonts/otf/temp-xb-zar.lua)(load: /Users/w
> > ill/Library/texlive/2010/texmf-var/luatex-cache/generic/fonts/otf/temp-xb-zar-b
> > d.lua)(load: /Users/will/Library/texlive/2010/texmf-var/luatex-cache/generic/fo
> > nts/otf/temp-xb-zar-it.lua)(load: /Users/will/Library/texlive/2010/texmf-var/lu
> > atex-cache/generic/fonts/otf/temp-xb-zar-bdit.lua) [1{/usr/local/texlive/2010/t
> > exmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux) )
> >  276 words of node memory still in use:
> >    2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 40 glue_spec, 3 attribute_lis
> > t, 1 write nodes
> >    avail lists: 2:22,3:5,4:26,6:27,7:2,9:7
> > </Users/will/Library/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
> > !LuaTeX error: cannot find OpenType font file for reading
> >  ==> Fatal error occurred, no output PDF file produced!
> 
> 
> What's going wrong here? Could this error messages be a little more clear?

That is a PDF backend error, it means the path luaotfload had passed to
luatex is non-existent. Possible causes are: the font have been moved
and the font database is outdated (unlikely, because I check if the font
exists on the disk before passing to luatex), or the font have been
moved after being cached, and the cache contain reference to the old
path (the /Users/will/Library/texlive/2010/texmf-var/luatex-cache/generic/fonts/otf/temp-xb-zar*.lua files).

The cache handling code of ConTeXt have been kept as is, but if this is
actually the cause, I'll see if we can do some validation.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the lualatex-dev mailing list