I'm trying to add persian text to my document but it doesn't accept the fonts I set and returns this error:
The font "XB Niloofar" cannot be found.
I just installed texlive using this guid. And this is the document I'm trying to compile:
\documentclass[12pt,a4paper,twoside]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{xepersian}
\settextfont[Scale=1, Mapping=arabic]{XB Niloofar}
\begin{document}
سلام!
\end{document}
Should I install these fonts or the problem is something else?
Thank you
Best Answer
Yes. You should install the font in your OS, or use the font as an external file.
If you installed the font file (e.g. using Windows control panel/font), then you can call your font using
no
mapping
is needed, sincexepersian
sets the proper mapping by default.If you want to use your font, without installing it, your font file must be accessible by your engine, i.e. either in your working directory, or a in proper place in
texmf
. UseExternalLocation
parameter for this situation:or whatever the filename is.
Please, by the way, make sure that you always load
xepersian
as the last package.