Approved
Last Updated: 09 Sep 2019 17:18 by ADMIN
Dave
Created on: 09 Sep 2019 17:18
Category: PdfProcessing
Type: Bug Report
0
PdfProcessing: CharCodes to glyph indices are incorrectly mapped when exporting TextBoxField with TrueType font and defined encoding
A TrueType font file defines a cmap table mapping the character codes to glyph indices. However, when an Encoding is defined in the font dictionary of the PDF, the defined Encoding must override the built-in cmap table. 

Currently, when a text fragment is exported with such a font the char code is mapped using the built-in cmap table and not the Encoding defined for the font, which may lead to incorrect glyphs.

Workaround: Change the font  of the TextBoxField's widget appearance:
foreach (var widget in field.Widgets)
{
    widget.TextProperties.Font = FontsRepository.Helvetica;
}
0 comments