# Undefined font shape

I have a xepersian document, e.g.

\documentclass[10pt,a4paper]{report}
\usepackage{xepersian}
\settextfont{Nazli}% http://http.debian.net/debian/pool/main/f/fonts-farsiweb/fonts-farsiweb_0.4.dfsg.orig.tar.xz
\begin{document}
این یک متن فارسی  است.
\textit{ادامه}
متن فارسی...
\end{document}


Upon compiling I get these warnings:

LaTeX Font Warning: Font shape EU1/Nazli(0)/m/it' undefined
(Font)              using EU1/Nazli(0)/m/n' instead on input line ***.


and the text inside \textit{} is not italic. What is causing the problem? and how can I fix this?

I have used Nazli in LibreOffice and it has an italic shape; or isn't that the same?

• I don't know Farsi, but is there a concept of italic characters in that language/glyphs at all?
– user31729
Jul 30 '15 at 21:52
• It's possible that LibreOffice fakes italic by slanting the letters. Jul 30 '15 at 21:53
• @ChristianHupfer, Yes. I should have mentioned with FreeFarsi I don't have this problem. Jul 30 '15 at 22:11
• @egreg It must do. There is no italic in the package so far as I can tell.
– cfr
Jul 30 '15 at 22:12
• Yes, as @egreg shows. However, the fact that it can be done does not mean that it ought to be done. Faked italics, like faked small-caps, are Evil. Font designers tend to feel quite strongly on this point in my (admittedly limited) experience. Italics are not slanted versions of upright fonts. Even oblique is not merely a slanted version of upright. At least, not for Latin scripts. For all I know, this might be perfectly fine in Arabic or Persian. Though I have my doubts.
– cfr
Jul 30 '15 at 22:24

Word processors like LibreOffice usually fake missing italic shape by geometrically slanting the glyphs. You can obtain the same result with XeLaTeX using the FakeSlant option to fontspec.

\documentclass[10pt,a4paper]{report}
\usepackage{xepersian}
\settextfont[
Script=Arabic,
ItalicFont=Nazli,
ItalicFeatures={FakeSlant=-0.5},
]{Nazli}
\begin{document}
این یک متن فارسی  است.
\textit{ادامه}
متن فارسی...
\end{document}


Probably 0.5 is exaggerated, but I used it for making the slanting more visible. The value should be negative in order to slant to the left.

As shown here, the fonts contained in the package are four:

homa.ttf
nazli.ttf
nazlib.ttf
titr.ttf


None of these appears to be a candidate for an italic version of Nazli. nazli.ttf is the regular, upright Nazli. nazlib.ttf provides Nazli Bold.

homa.ttf and titr.ttf are distinct fonts: Homa and Titr. These are not directly related to Nazli - they are just released by upstream as part of the same collection of fonts, and included in Debian's package because these, together with Nazli, are suitably licensed.

• homa.ttf and titr.ttfaren't really related to Nazli. They are just in the same package. Jul 30 '15 at 22:14