Inserting Text æøåÆØÅ

6 posts, 0 answers
  1. Brian
    Brian avatar
    24 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2014 Link to this post

    Hi,

    Setting:

    TextProperties.Font = FontsRepository.Helvetica

    Editor.DrawText("æøåÆØÅ")

    Gives an error

    Any setting for nordic letters I am missing?

    Regards,
    Brian
  2. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 29 Sep 2014 Link to this post

    Hi Brian,

    Can you be more specific about the error you are having. We have tried your code and everything works as expected.

    We are looking forward to your reply.

    Regards,
    Kammen
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. Brian
    Brian avatar
    24 posts
    Member since:
    Apr 2008

    Posted 29 Sep 2014 in reply to Kammen Link to this post

    The error comes from the export statement:

          Dim OutStream As New FileStream(Me.FileName, FileMode.Create)
          PdfFormatProvider.Export(Me.PDFDocument, OutStream)
          OutStream.Close()

    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
         at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
         at Telerik.Windows.Documents.Core.Fonts.Type1.Type1Format.Dictionaries.Type1Font.ReadGlyphData(String name)
         at Telerik.Windows.Documents.Core.Fonts.Type1.Type1Format.Dictionaries.Type1Font.GetGlyphData(String name)
         at Telerik.Windows.Documents.Core.Fonts.Type1.Type1Format.Dictionaries.Type1Font.GetAdvancedWidth(String glyphName)
         at Telerik.Windows.Documents.Core.Fonts.Type1.Type1Format.Type1FontSource.GetAdvancedWidth(Int32 charCode)
         at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.SimpleFont.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font)
         at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.Font.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
         at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.Export(Stream output, IPdfExportContext context)
         at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFixedDocument document, Stream output)
         at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
         at ......................................
  4. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 29 Sep 2014 Link to this post

    Hello Brian,

    Unfortunately we are still unable to reproduce this issue. Is it possible to open a support ticket where you can attach a working example that reproduce it in order to further investigate this.

    Regards,
    Kammen
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  5. Brian
    Brian avatar
    24 posts
    Member since:
    Apr 2008

    Posted 30 Sep 2014 in reply to Kammen Link to this post

    Did solve the problem using:

          Dim font As FontBase = Nothing

          Dim FontFamily As New System.Windows.Media.FontFamily("Verdana")

          Dim success As Boolean = FontsRepository.TryCreateFont(FontFamily, font)

          TextProperties.Font = font


    /Brian



  6. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 30 Sep 2014 Link to this post

    Hello Brian,

    FixedContentEditor should do this by itself. It implements font fallback mechanism that will change the font of th TextFragments as soon as the symbols does not present in the specified font. That is why I am confused why this exception happened to you.

    I think this may be a bug that should be fixed in the newer version of the library.

    I am glad that you have make this work.

    Regards,
    Kammen
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top