We should implement the logic for getting character codes from Unicode when using CFFFontSource.
Workaround: The font may be changed by creating a similar font with FontsRepository.TryCreateFont(...) method.
Telerik.Windows.Documents.Fixed.Model.Fonts.FontsRepository.RegisterFont(new Telerik.Documents.Core.Fonts.FontFamily("Arial"), Telerik.Documents.Core.Fonts.FontStyles.Normal, Telerik.Documents.Core.Fonts.FontWeights.Normal, fontData); // fontData is a byte[] keeping the font definition
FontBase font;
bool hasCreatedFont = FontsRepository.TryCreateFont(new FontFamily("Arial"), out font);
foreach (TextField field in document.AcroForm.FormFields.OfType<TextField>())
{
if (hasCreatedFont)
{
foreach (var widget in field.Widgets)
{
widget.TextProperties.Font = font;
}
field.TextProperties.Font = font;
}
}