I'm trying to switch from pdflatex to xelatex in wsl and have not yet found a way to fix the font lookup problem.
kpathsea: Running mktextfm P22Virgi
/usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map source abbreviation P for P22Virgi.
/usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update /usr/share/texlive/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input P22Virgi
This is METAFONT, Version 2.7182818 (TeX Live 2019/Debian) (preloaded base=mf)
kpathsea: Running mktexmf P22Virgi
! I can't find file `P22Virgi'.
<*> ...ljfour; mag:=1; nonstopmode; input P22Virgi
Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input P22Virgi
Transcript written on mfput.log.
grep: P22Virgi.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input P22Virgi' failed to make P22Virgi.tfm.
kpathsea: Appending font creation commands to missfont.log.
! Package fontspec Error: The font "P22Virgi" cannot be found.
For immediate help type H <return>.
...
l.7
? H
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!
?
With:
hsmyers@BigIron:~/c-dev/tex/tab$ cat ~/.config/fontconfig/fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>/mnt/c/Windows/Fonts/</dir>
</fontconfig>
hsmyers@BigIron:~/c-dev/tex/tab$
and after fc-cache:
hsmyers@BigIron:~/c-dev/tex/tab$ ll /mnt/c/Windows/Fonts/P22Vir*
-rwxrwxrwx 1 hsmyers hsmyers 88643 Feb 24 2005 /mnt/c/Windows/Fonts/P22Virgi.PFB*
-rwxrwxrwx 1 hsmyers hsmyers 1137 Feb 24 2005 /mnt/c/Windows/Fonts/P22Virgi.pfm*
-rwxrwxrwx 1 hsmyers hsmyers 144120 Feb 24 2005 /mnt/c/Windows/Fonts/P22Virgi.ttf*
hsmyers@BigIron:~/c-dev/tex/tab$
on a minimal example file 'test.tex':
\documentclass{article}
\usepackage{fontspec,lipsum}
\defaultfontfeatures{Ligatures=TeX}
% \setromanfont{/mnt/c/Windows/Fonts/P22Virgi.ttf}%
\setromanfont{P22Virgi}%
\begin{document}
\end{document}
Note that the full path (despite the font.conf effort) was tried and failed. A 'Path = ' version failed as well. I've used xelatex in windows, but this is the first attempt under wsl(Ubuntu). I've installed texlive and have had no problems with pdflatex, but prefer the font friendly xelatex hence this attempt.