2

I get the following warning and I figured the bold texts are not shown bold in the output:

Font shape `EU1/BNazanin(0)/m/it' undefined
(Font)              using `EU1/BNazanin(0)/m/n' instead 

I've seen this question which is quite similar to mine but I am on windows 10 (not Linux) plus my friends didn't have this problem (I have tex code of my friend's thesis and weirdly enough the output has bold texts while the same font was used...I can't get output from it but when I open it the output pdf is shown automatically), I'd like to know what is wrong with my document or probably with the fonts defined on my system. It'd be nice if there were a general solution to this warning.

\documentclass[a4paper,12pt]{report}
\usepackage{amsthm}
\usepackage[extrafootnotefeatures]{xepersian}
\settextfont[Scale=1.2]{B Nazanin}
\setlatintextfont{Calibri}
%\setlatintextfont[ExternalLocation,BoldFont={lmroman10-bold},BoldItalicFont={lmroman10-bolditalic},ItalicFont={lmroman10-italic}]{lmroman10-regular}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\titr[Scale=1]{B Titr}
\defpersianfont\traffic[Scale=1]{B Traffic}
\deflatinfont\calibri{Calibri}
\renewcommand{\proofname}{\textbf{برهان}}

\begin{document}

\begin{proof}
سلام بر تو 
\end{proof}

سلام بر تو
\end{document}
3

The warning is not complaining about bold face, it's complaining about italic face, which indeed it should, because "B Nazanin" does not come in italic face.

The proof environment uses italic face for proofname, in addition to the bold face you've added, and that's what causes the warning you get.

Here is the output on my system: B Nazanin

As you can see the proofname is in bold face. Check the folder where your fonts are installed, then look for "B Nazanin". Each face (bold, italic, etc.) comes in a separate file, so in order to have the bold face for "B Nazanin", you should have another font file like "B Nazanin Bold.ttf". Hence, there should be (at least) 2 files, "B Nazanin.ttf" and "B Nazanin Bold.ttf" in your fonts directory.

As a general comment, "B Nazanin" is not even a standard font, and a lot of small things (such as the decimal mark, thousands separator, and the number zero) are either missing or aren't according to the standards. I highly recommend you to use a different font (such as the ones in the HM-X series).

Here is my result with "HM XNiloofar" font (and no warnings given): HM XNiloofar

If you really need to use "B Nazanin", I suggest you to use a font named "HM FNazli" from this series, which is almost identical to "B Nazanin", but it does not have the problems associated with "B Nazanin". Here is the same text typeset with this font (note that the shape of the letters are the same as the other font): HM FNazli

  • Thank you for your answer. That warning might be caused by nonexistance of italic font but the bold texts are not shown correctly in my document as well, which is more imporant to me than italic. Anyway, you are right about the weakness of the font I used but that's what my university has chosen and we have no choice but to use it! – Gigili Aug 31 '16 at 12:31
  • I've updated my answer. – NEO Aug 31 '16 at 14:38
  • Thank you. Your second output seems a bit blur to me, was that intentional? – Gigili Aug 31 '16 at 15:03
  • No it just looks blur in the screen-shot I took. The text itself is totally fine. :) – NEO Aug 31 '16 at 15:39
  • 1
    @AhmadYoosofan, still works for me. – NEO Jan 25 '17 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.