Closed e-kwsm closed 6 years ago
XeLaTeX cannot compile
\documentclass{article}
\usepackage{academicons}
\begin{document}
\aiOrcid
\end{document}
under my environment, frozen TeX Live 2017:
while LuaLaTeX Version 1.0.4 (TeX Live 2017) can.
The error messages are
(/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
kpathsea: Running mktextfm academicons
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input academicons
This is METAFONT, Version 2.7182818 (TeX Live 2017) (preloaded base=mf)
kpathsea: Running mktexmf academicons
! I can't find file `academicons'.
<*> ...our; mag:=1; nonstopmode; input academicons
Please type another input file name
! Emergency stop.
<*> ...our; mag:=1; nonstopmode; input academicons
Transcript written on mfput.log.
grep: academicons.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input academicons' failed to make academicons.tfm.
kpathsea: Appending font creation commands to missfont.log.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "academicons" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.12 \newfontfamily{\AI}{academicons}
?
This patch solves the error.
@e-kwsm the error reads The font "academicons" cannot be found.
. Have you installed the Academicons font on your system? Please read the package instructions before using it.
@diogo-fernan
Have you installed the Academicons font on your system?
Yes.
$ tlmgr info --list academicons 2> /dev/null | tail -n9
Included files, by type:
run files:
texmf-dist/fonts/truetype/public/academicons/academicons.ttf
texmf-dist/tex/latex/academicons/academicons.sty
doc files:
texmf-dist/doc/fonts/academicons/README details="Readme"
texmf-dist/doc/fonts/academicons/academicons.pdf details="Package documentation"
texmf-dist/doc/fonts/academicons/academicons.tex
Only LuaLaTeX can find the bundled font, as documented in fontspec:
In \LuaTeX, fonts found in the \textsc{texmf} tree can also be loaded by name.
fontspec-doc-fontsel.tex#L97-L102
\XeTeX\ and \LuaTeX\ also allow fonts to be loaded by file name instead of font name. When you have a very large collection of fonts, you will sometimes not wish to have them all installed in your system's font directories. In this case, it is more convenient to load them from a different location on your disk. This technique is also necessary in \XeTeX\ when loading OpenType fonts that are present within your \TeX\ distribution, such as \path{/usr/local/texlive/2013/texmf-dist/fonts/opentype/public}. Fonts in such locations are visible to \XeTeX\ but cannot be loaded by font name, only file name; \LuaTeX\ does not have this restriction.
(Emphasis added)
Or, you mean we have to manually do something like cp /usr/local/texlive/2017/texmf-dist/fonts/truetype/public/academicons/academicons.ttf /usr/local/share/fonts/truetype/academicons
?
I don't think it's a good idea.
The packages requires the font to be installed on the system, as per the documentation, where it is visible to all programs, not just TeX.
The packages requires the font to be installed on the system
The design is not good. This patch simplifies installation and maintenance. I was confused the situation where LuaLaTeX worked but XeLaTeX didn't though academicons was installed by tlmgr. Why not? Those who wants to use academicons for other softwares can install it on a system by themselves.
Implemented the suggestion in https://github.com/diogo-fernan/academicons/commit/8fe8286188d1940fc2f3ab3b4a363057f1298095 and uploaded a new version to CTAN, which should be synchronized across repositories during the next day.
Thanks. :)
originally reported in https://tex.stackexchange.com/questions/296294/missing-font-with-academicons-sty/296300#296300