Unplanned
Last Updated: 17 Sep 2020 10:24 by ADMIN
Dave
Created on: 09 Sep 2019 17:18
Category: PdfProcessing
Type: Bug Report
3
PdfProcessing: CharCodes to glyph indices are incorrectly mapped when exporting TextBoxField with TrueType font and defined encoding

When a TrueType font is defined, the mapping of character codes to glyph indices depends on the built-in cmap table mappings defined in the font and the Encoding property defined in the PDF dictionary.

However, the current implementation maps all characters with cmap tables for Microsoft Symbolic and Macintosh Roman, which causes incorrect mapping results, e.g. space characters are mapped to an Ê glyph.

The issue is also described in the following public item: TryGetCharCode for OpenTypeFont uses wrong cmap and returns wrong charcode.

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

2 comments
ADMIN
Martin
Posted on: 17 Sep 2020 10:24

Hello Neil,

Until this bug is fixed I would suggest avoiding using TrueType fonts with a defined encoding when the document contains TextBoxField. Please, make sure you are following this item in order to receive an update when its status changes.

Regards,
Martin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Neil N
Posted on: 16 Sep 2020 19:48
Does this bug mean that clients cannot use the fonts they want to when creating a PDF form?