Font (Myanmar3) not rendering correctly in iText

前端 未结 2 2012
清歌不尽
清歌不尽 2020-12-21 16:56

In jasper-reports section there is this jasper-report-character-encoding-in-pdf question.

The problem can not be solved in jasper report since it seems to be an itex

相关标签:
2条回答
  • 2020-12-21 16:59

    Please try the below codes,

    string ZawgyiOnePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), "ZawgyiOne.ttf");
                BaseFont ZawgyiOneBaseFont = BaseFont.CreateFont(ZawgyiOnePath, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
    
     iTextSharp.text.Font ZawgyiOneFont = new iTextSharp.text.Font(ZawgyiOneBaseFont, 9);
    
    0 讨论(0)
  • 2020-12-21 17:20

    Converting Bruno Lowagie (Original developer of itext) comment into answer (community wiki)

    The behavior you see is caused by the fact that iText doesn't support ligatures. (Current version on github.com 5.5.8)

    You need one of the next, unreleased versions of iText. We'll release beta versions next year (2016) but only to customers

    Thanks to some bounty offered by @Rad Lexus this other question about accessing directly openType glyph in iText has an answer Accessing OpenType glyph variants in iText

    0 讨论(0)
提交回复
热议问题