[tex-live] [TeXLive 2013 pretest] fontspec won't load local fonts in subdirectories

Loïc Grobol loic.grobol at gmail.com
Thu May 9 13:56:38 CEST 2013


I am not sure of which package is to blame, this is why this message
is going to TeXLive as well as Will Robertson

I have this issue since Monday, I think. I usually use local
EB-Garamond fonts located in a fonts/ directory so this is the file
structure
.
├── fonts
│   └── EBGaramond12-Regular.otf
└── texte.tex

And this is texte.tex

----- texte.tex -----

    \documentclass{article}
    \usepackage{fontspec}
        \setmainfont[Path=fonts/]{EBGaramond12-Regular.otf}
    \begin{document}
        And that's how it fails.
    \end{document}

----- end texte.tex-----

The compilation with `lualatex texte.tex` fails, with texte.log
showing these lines (other lines probably meaningless for this issue
snipped out)

----- texte.log (snippet) -----
(/usr/local/texlive/2013/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
\g__file_internal_ior=\read1
luaotfload | load: auto-selecting default features for script: dflt
luaotfload | load: unsupported font option: nil
fonts : font with asked name 'fonts' is not found using lookup 'file'
fonts : unknown font 'fonts', loading aborted

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "EBGaramond12-Regular.otf" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.3 ...infont[Path=fonts/]{EBGaramond12-Regular.otf}

|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
| Check the spelling, where the font is installed etc. etc.
|
| When in doubt, ask someone for help!
|...............................................

luaotfload | load: auto-selecting default features for script: dflt
luaotfload | load: unsupported font option: nil
fonts : font with asked name 'fonts' is not found using lookup 'file'
fonts : unknown font 'fonts', loading aborted
.................................................
. fontspec info: "no-scripts"
.
. Font EBGaramond12-Regular.otf does not contain any OpenType `Script'
. information.
.................................................
\g_fontspec_family_EBGaramond12-Regular.otf_int=\count318
luaotfload | load: auto-selecting default features for script: dflt
luaotfload | load: unsupported font option: nil
fonts : font with asked name 'fonts' is not found using lookup 'file'
fonts : unknown font 'fonts', loading aborted

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "EBGaramond12-Regular.otf" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.3 ...infont[Path=fonts/]{EBGaramond12-Regular.otf}

|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
| Check the spelling, where the font is installed etc. etc.
|
| When in doubt, ask someone for help!
|...............................................

.................................................
. fontspec info: "defining-font"
.
. Font family 'EBGaramond12-Regular.otf(0)' created for font
. 'EBGaramond12-Regular.otf' with options [Path=fonts/].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"file:fonts/EBGaramond12-Regular.otf:mode=node;"
.................................................
luaotfload | load: auto-selecting default features for script: dflt
luaotfload | load: unsupported font option: nil
fonts : font with asked name 'fonts' is not found using lookup 'file'
fonts : unknown font 'fonts', loading aborted
! Font \EU2/EBGaramond12-Regular.otf(0)/m/n/10=file:fonts/EBGaramond12-Regular.o
tf:mode=node; at 10pt not loadable: metric data not found or bad.
<to be read again>
relax
l.3 ...infont[Path=fonts/]{EBGaramond12-Regular.otf}

I wasn't able to read the size data for this font,
so I will ignore the font specification.

----- end texte.log -----

The line that bothered me more was

    fonts : font with asked name 'fonts' is not found using lookup 'file'

since `fonts` is a misleading name, I renamed the directory to
`weierstrass` and changed the code accordingly and it yielded

    fonts : font with asked name 'weierstrass' is not found using lookup 'file'

I then tried

    \setmainfont[Path=./weierstrass/]{EBGaramond12-Regular.otf}

which resulted in

    fonts : unknown font '.', loading aborted

so the issue appears to be with path separators.

To be sure, I tried with a font file for a font not installed on my
system (EBGaramond-Bold which is still an alpha) put in . next to
texte.tex and using the ExternalLocation option of fontspec. The font
loaded without issue.

This code was working flawlessly last week and seems to valid
according to fontspec's doc, so obviously one of the last updates
messed something out. However, I am not sure that fontspec is the
culprit, and since kpathsea had an update just before this issue
appearance, I do suspect it.

I have attached a testcase.tar.gz of the described setting if you want
to try it by yourselves.

Cheers,
LG

--
Loïc Grobol.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcase.tar.gz
Type: application/x-gzip
Size: 224724 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20130509/19bb3c67/attachment-0001.gz>


More information about the tex-live mailing list