1 of 4

EB Garamond (bold) small caps “suddenly” unavailable in lualatex?

First of all, apologies for not coming up with an MWE, but I'm not even sure how could I reproduce this problem in a MWE.

A year ago, I had an Ubuntu 14.04 machine, where I prepared a CV using altacv; which was compiled with lualatex, TexLive 2014 or 2015. In there, I had used:

...
\newfontfamily\titlenamefont{EB Garamond}[Ligatures=TeX]
...
\name{\hspace{4em}\addfontfeature{LetterSpace=10.0}\textsc{en Di}}
...

The PDF produced at that time rendered \name like this:

enter image description here

... so, bold with small caps - and the relevant font information in that pdf is:

$ pdffonts /tmp/mozilla_mozillaUser0/mycv.pdf | grep aramond
DCOGJC+EBGaramond08-Regular          CID Type 0C       Identity-H       yes yes yes     15  0

Since then, that machine broke down, although I could still access its hard drive; and I got a new machine, on which I installed Ubuntu 14.04 from scratch - and copied TexLive 2014 from the broken machine (I've always used TexLive by installing it in an "off" folder, and then adding /path/to/texlive/2014/bin/i386-linux to the $PATH); pdflatex, lualatex are still running without a problem.

So I try to compile this CV on the new machine, and first it complains:

! fontspec error: "font-not-found"
! 
! The font "EB Garamond" cannot be found.

At this point, I have tried both:

  • sudo apt-get install fonts-ebgaramond fonts-ebgaramond-extra (and to remove, sudo apt-get remove --purge fonts-ebgaramond fonts-ebgaramond-extra)
  • tlmgr install ebgaramond (and to remove, tlmgr remove ebgaramond)
  • ... and after each install or uninstall, luaotfload-tool -vvv --update --force

The small-caps font seems to be registered - say, after sudo apt-get install fonts-ebgaramond fonts-ebgaramond-extra and luaotfload-tool -vvv --update --force, I get this:

$ zgrep aramond /path/to/texlive/2014/texmf-var/luatex-cache/generic/names/luaotfload-names.lua.gz | grep -v '"full"' | grep -i sc
     ["EBGaramond08-SC"]=329,
    ["EBGaramond08-SC.ttf"]=329,
   ["basename"]="EBGaramond08-SC.ttf",
   ["fontname"]="ebgaramond08sc",
   ["fullname"]="ebgaramond08scregular",
   ["fullpath"]="/usr/share/fonts/truetype/ebgaramond/EBGaramond08-SC.ttf",
   ["metafamily"]="ebgaramond08sc",
   ["psname"]="ebgaramond08sc",
  ["/usr/share/fonts/truetype/ebgaramond/EBGaramond08-SC.ttf"]={

... however, when I build the CV document with lualatex mycv.tex, I get this message:

...
LaTeX Font Warning: Font shape `EU2/EBGaramond(0)/bx/n' undefined
(Font)              using `EU2/EBGaramond(0)/m/n' instead on input line 129.


LaTeX Font Warning: Font shape `EU2/EBGaramond(1)/bx/n' undefined
(Font)              using `EU2/EBGaramond(1)/m/n' instead on input line 129.


LaTeX Font Warning: Font shape `EU2/EBGaramond(1)/bx/sc' undefined
(Font)              using `EU2/EBGaramond(1)/bx/n' instead on input line 129.
...

... which, in the case of bx/sc, I guess it means that the bold small caps shape is undefined. Then the \name is rendered as:

enter image description here

... so neither bold, nor small caps - and the pdf fonts info says:

$ pdffonts mycv.pdf | grep aramond
PMDTVQ+EBGaramond12-Regular          CID Type 0C       Identity-H       yes yes yes     15  0

So, this is what puzzles me - in the original case, when the bold small caps \name was rendered, the EBGaramond08-Regular was used; however, now, somehow, the process falls back on EBGaramond12-Regular (even if EBGaramond08 is present, also as small caps?)

Anyways, thanks to Font found with XeLaTeX not found with LuaLaTeX on Linux, I found that in the directory /path/to/texlive/2014/texmf-var/luatex-cache/generic/fonts/otf, I've had files ebgaramond08/12-regular/italic.lua/luc, where the ebgaramond08-*.lua/c were referring to files in ~/.fonts. So, I removed all previously installed instances of ebgaramond, and then tried to install in ~/.fonts directly from the zip:

rm -v /path/to/texlive/2014/texmf-var/luatex-cache/generic/fonts/otf/ebgaramond*
wget https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-0.016.zip
unzip EBGaramond-0.016.zip
cp -a EBGaramond-0.016/otf/*.otf ~/.fonts/
# this copies: EBGaramond08-Italic.otf EBGaramond08-Regular.otf EBGaramond12-AllSC.otf EBGaramond12-Italic.otf EBGaramond12-Regular.otf EBGaramond-InitialsF1.otf EBGaramond-InitialsF2.otf EBGaramond-Initials.otf EBGaramondSC08-Regular.otf EBGaramondSC12-Regular.otf
fc-cache -f -v 
fc-list | grep aramond # listed
luaotfload-tool -vvv --update --force 
zgrep aramond /path/to/texlive/2014/texmf-var/luatex-cache/generic/names/luaotfload-names.lua.gz | grep -v '"full"' # listed
texhash
lualatex mycv.tx # only after this, do ebgaramond*.lua/luc appear in /path/to/texlive/2014/texmf-var/luatex-cache/generic/fonts/otf/

... however, AGAIN only the ebgaramond12-*.lua/luc are generated, and EBGaramond12-Regular is packed in the pdf, without bold or small caps - even if the EBGaramond08* ones are present on the system! (I've also tried just copying the 08* fonts, without the 12* ones, to ~/.fonts - and then I get bold, but no small caps).

Would anyone know how can I "persuade" lualatex to use the EB Garamond bold small caps, as it did one year ago, in a more or less the same system environment?