Unplanned
Last Updated: 12 Feb 2025 16:22 by Khaled Salman
Khaled Salman
Created on: 12 Feb 2025 16:22
Type: Bug Report
1
PDF rendering is not correct when using a combination of Arabic and English in the same item and the font family is set to "Calibri"

When there is a combination of Arabic and English text in any control and if the font family is set to "Calibri", exporting to PDF results in the following error in the stack trace:

Telerik.ReportDesigner.exe Error: 0 : System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Documents.Fixed.Fonts.OpenType.Tables.MultipleSubstFormat1.Apply(GlyphsSequence glyphIDs)
   at Telerik.Documents.Core.Fonts.OpenType.Tables.Lookup.Apply(GlyphsSequence glyphIDs)
   at Telerik.Documents.Fixed.Fonts.OpenType.Tables.ChainedSequenceContextFormat3.ApplySubstitution(GlyphInfo glyphInfo)
   at Telerik.Documents.Fixed.Fonts.OpenType.Tables.ChainedSequenceContextFormat3.Apply(GlyphsSequence glyphIDs)
   at Telerik.Documents.Core.Fonts.OpenType.Tables.Lookup.Apply(GlyphsSequence glyphIDs)
   at Telerik.Documents.Core.Fonts.OpenType.Tables.Features.FeatureInfo.ApplyLookup(Lookup lookup, GlyphsSequence glyphIDs)
   at Telerik.Documents.Core.Fonts.OpenType.Tables.LangSys.Apply(GlyphsSequence glyphIDs)
   at Telerik.Documents.Core.Fonts.OpenType.OpenTypeFontSourceBase.ApplySubstitutions(UnicodeRange range, List`1 glyphInfos)
   at Telerik.Documents.Core.Fonts.OpenType.OpenTypeFontSourceBase.TryGetGlyphIds(String text, UInt16[]& glyphIds)
   at Telerik.Reporting.Pdf.PdfFontDictionary.AddChars(String text)
   at Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont pdfFont, IBrush brush, RectangleF rect, Boolean rightToLeft)
   at Telerik.Reporting.ImageRendering.CanvasPdf.DrawRegularChunk(String text, StringChunkContext context)
   at Telerik.Reporting.ImageRendering.CanvasBase.DrawStringMultiline(String s, StringChunkContext context, Boolean isFinalTextChunk)
   at Telerik.Reporting.ImageRendering.DocumentBase.WriteText(String text, RectangleF bounds, IFont font, Color foreground, TextFormat format, MatrixBase transform, Boolean isFinalTextChunk)
   at Telerik.Reporting.Writing.TextBoxWriter.WriteContent(DocumentWriter writer, TextBox textBox, ElementPageInfo pageInfo)
   at Telerik.Reporting.Writing.ProcessingContentElementWriter`1.WriteElement(T element, ElementPageInfo pageInfo, DocumentWriter writer)
   at Telerik.Reporting.Writing.WriteOperationsDispatcher.Visit(TextBox textBox)
   at Telerik.Reporting.Processing.ProcessingElementVisitor.Visit(LayoutElement element)
   at Telerik.Reporting.Writing.DocumentWriter.Telerik.Reporting.BaseRendering.IWriter.WriteStartElement(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.Paging.PageElementsLayer.OutputToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageContent.Output(IPageHandler handler)
   at Telerik.Reporting.Paging.PageCompositionBase.OutputPageContent(Stopwatch stopwatchOutputContent, PageContent pageContent)
   at Telerik.Reporting.Paging.PageCompositionBase.<>c__DisplayClass124_0.<CreatePageContentOutputTask>b__0()

If we change the font family to "Arial" the report is exported to PDF correctly.

0 comments