I'm trying to add Persian text to my document, however, my favorite fonts (which already have been installed on Windows 10 and I use them on Microsoft Word) can not be identified.
! fontspec error: "font-not-found"!! The font "XB Niloofar" cannot be found.!!
! fontspec error: "font-not-found"!! The font "Yas" cannot be found.!!
! fontspec error: "font-not-found"!! The font "IranNastaliq" cannot be found.!!
Here is the document I'm trying to compile:
\documentclass[11pt]{exam}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Niloofar}
\setdigitfont[Scale=1]{Yas}
\setlatintextfont[Scale=0.9]{Times New Roman}
\defpersianfont\nastaliq[Scale=1]{IranNastaliq}
\begin{document}
\textbf{سلام}
\end{document}
%HOMEDRIVE%%HOMEPATH%\.texlive2019\texmf-var\, delete them. They might be hiding system fonts. – Davislor May 29 '19 at 06:12otfinfo -i, or try loading them by filename, which should always work. – Davislor May 29 '19 at 06:22DIR "C:\Windows\Fonts\XB*"and you should see the filename, e.g.C:\Windows\Fonts\CB Niloofar.ttf. If it's not there, it might have been installed for you only.. – Davislor May 29 '19 at 06:34otfinfo -i "C:\Windows\Fonts\XB Niloofar.ttf". – Davislor May 29 '19 at 06:34DIR "C:\Windows\Fonts\XB*"and I gotVolume in drive C is OS - Volume Serial Number is 04D2-B7D3- Directory of C:\Windows\Fonts - File Not Found. How can I fix it? – Vahid May 29 '19 at 07:07\settextfont[Scale = 1.0 , BoldFont = *Bd , ItalicFont = *It , BoldItalicFont = *BdIt , Extension = .ttf ]{XB Niloofar}. Would you please let me know how I can fix it with\settextfont[Scale=1]{XB Niloofar}? – Vahid May 29 '19 at 07:19otfinfo -i, it theoretically should work. – Davislor May 29 '19 at 07:21\settextfont[Scale=1]{XB Niloofar}in a current texlive 2019 works fine for me on windows. But you should really check if it works with fontspec alone. Your error message looks unusual and xepersian changes some fontspec internals. – Ulrike Fischer May 29 '19 at 07:33XB Niloofar.fontspecwith the correct options for your installation. That should let you work around just about any problem without changing your source. – Davislor May 29 '19 at 07:43