2

The words are not getting displayed properly in the pdf even though they are getting displayed correctly in source file. And when I tried to copy words from the pdf file and paste them, they are pasted as what they should be (as they are in the source file) and not identical to pdf display. Example: The following content

"जिले का रहने वाला हूँ! मैने संगणक विज्ञान में स्नातक किया है|" 

is getting displayed as:

enter image description here

I am working on ShareLatex website. I have configured xelatex in the settings. And I have defined the following in my latex file:

\usepackage{polyglossia}
\setmainlanguage[numerals=Devanagari]{hindi}
\setotherlanguage{english}
\usepackage{fontspec}
\newfontfamily\hindifont[ExternalLocation]{AnnapurnaSIL-R}
\setdefaultlanguage{hindi}
Manish
  • 63
  • 3
    in order for anyone to help you with this problem you need to edit your question to include (i) a small document that shows the problem (ii) a screen shot of the output that shows what the problem looks like and (iii) some details of how you are creating the source file. – Alan Munn Jun 10 '14 at 19:37
  • updated the question – Manish Jun 11 '14 at 15:38
  • What's wrong with the output you're showing in that picture? – Sverre Jun 11 '14 at 16:15
  • @Sverre: Please compare the two strings character-wise and you will see the difference. – Manish Jun 11 '14 at 17:44
  • I did. And I didn't see the difference. To help us help you, tell us what the problem is - don't make us guess. – Sverre Jun 11 '14 at 17:49
  • @Sverre: The problem involved here is that some characters are displaced to the right (in Hindi we call them matras). And some characters which should be half written are displayed incorrectly (the half characters is written as combination of a full character and a special character but here two characters are displayed instead of one). – Manish Jun 11 '14 at 17:54
  • The example would be clearer if you only included characters that are displayed incorrectly, instead of interjecting them among correctly rendered characters. – Sverre Jun 11 '14 at 17:57
  • Would you please expand the snippet from your preamble into a compilable example? And are you using the latest version of the font, from SIL? – Thérèse Jun 11 '14 at 18:37
  • With polyglossia at hand, I would guess that you need to use [Script=Devanagari] when loading the font for it to work correctly. Alternatively, you can set up \devanagarifont, of course. – brian-ammon Jun 11 '14 at 19:39

1 Answers1

1

With "Nakula" font, I am able to get the output fine. It can be downloaded from http://bombay.indology.info/software/fonts/devanagari/

enter image description here