Two things up front:
- As
XePersian
is relying on the XeTeX
engine, I would recommend using polyglossia
instead of babel
.
- The
article
document class cannot use the 14pt
option; for more information, take a look at this answer.
The Problem in your case is that XePersian
clearly changes all western numerals (123) into genuine Arabic numerals (١٢٣), even though the XB Niloofar
font contains both. Therefore, you need to tell XeTeX
to use a different font than XePersian
uses with \settextfont
. If you do not specify a different font, XePersian
will be used for typesetting, which will of course substitute the numerals.
First, of course, you need to tell XeTeX
there is another language besides Farsi. You should use polyglossia
to set this up: \setotherlanguage[]{english}
. Then you must tell polyglossia
to use a different font for all English text with \newfontfamily\englishfont{XB Niloofar}
. This can of course be the exact same typeface as your XePersian
\settextfont
, but this time, it will not go through XePersian
and thusly use the correct number forms. In the document, use \textenglish{}
or \begin{english}
to switch to an English environment.
Using the above suggestions will yield the following MWE:
\documentclass[12pt,a4paper]{article}
\usepackage{polyglossia}
%\setdefaultlanguage[]{farsi}
\setotherlanguage[]{english}
\newfontfamily\englishfont{XB Niloofar}
\usepackage{enumerate}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\begin{document}
\today
\textenglish{\today}
\end{document}
which gives this output:

On a side note, setting \setdefaultlanguage[]{farsi}
, which would be normal practice with polyglossia
, does not work, because it clashes with XePersian
, therefore it is commented out here but you are welcome to delete it.
\usepackage[persian,english]{babel} ... \begin{document} \selectlanguage{persian}