title: Why is the Gujarati-Indian text not rendered correctly using Arial Unicode MS?
body: <p><em>This is a follow-up on this question <a href="https://stackoverflow.com/questions/36600311/jasper-report-pdf-export-font-of-different-language">How to export fonts in Gujarati-Indian Language to pdf?</a>, <a href="https://stackoverflow.com/users/766786/amedee-van-gasse">@amedee-van-gasse</a>, QA Engineer at iText <a href="https://stackoverflow.com/questions/36600311/jasper-report-pdf-export-font-of-different-language?noredirect=1#comment60879352_36600311">asked me</a> to post a question specific to itext with relevant mcve.</em></p>
  
  <p>Why is this sequence of unicode <code>\u0ab9\u0abf\u0aaa\u0acd\u0ab8</code> not rendered correctly?</p>
  
  <p>It should be rendered like this:</p>
  
  <p>હિપ્સ , also tested with <a href="https://www.branah.com/unicode-converter" rel="nofollow noreferrer">unicode-converter</a></p>
  
  <p>However <strong>this code</strong> (example adapted form <a href="http://developers.itextpdf.com/examples/itext-action-second-edition/chapter-11" rel="nofollow noreferrer">iText: Chapter 11: Choosing the right font</a>)</p>
  
  <pre><code>public class FontTest {
  
      /** The resulting PDF file. */
      public static final String RESULT = "fontTest.pdf";
      /** the text to render. */
      public static final String TEST = "\u0ab9\u0abf\u0aaa\u0acd\u0ab8";
  
      public void createPdf(String filename) throws IOException, DocumentException {
          Document document = new Document();
          PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename));
          document.open();
          BaseFont bf = BaseFont.createFont(
              "ARIALUNI.TTF", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
          Font font = new Font(bf, 20);
          ColumnText column = new ColumnText(writer.getDirectContent());
          column.setSimpleColumn(36, 730, 569, 36);
          column.addElement(new Paragraph(TEST, font));
          column.go();
          document.close();
          System.out.println("DONE");
      }
  
      public static void main(String[] args) throws IOException, DocumentException {
          new FontTest().createPdf(RESULT);
      }
  }
  </code></pre>
  
  <p>Generates this <strong>result</strong>:</p>
  
  <p><a href="https://i.stack.imgur.com/DH28T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DH28T.png" alt="pdf output"></a></p>
  
  <p>That looks different from</p>
  
  <blockquote>
    <p>હિપ્સ</p>
  </blockquote>
  
  <p>I have test with <code>itextpdf-5.5.4.jar</code>,<code>itextpdf-5.5.9.jar</code> and also <code>itext-2.1.7.js3.jar</code> (distributed with jasper-reports) </p>
  
  <p>The font used it the one distributes with MS Office <code>ARIALUNI.TTF</code> and it can be download from here <a href="http://www.myfontfree.com/arial-unicode-ms-myfontfreecom126f36926.htm" rel="nofollow noreferrer">Arial Unicode MS</a> <sup>*Maybe there are some legal issues downloading see Mike 'Pomax' Kamermans comment</sup></p>