Search code examples
c#.netfontspdfsharpmigradoc

C# Get specific char from a custom font and insert it into string


I have such string "my profeesion is - G", I need to replace "G" with custom font symbol. In custom font this char is an icon. So result should be like "my profeesion is - 'ICON AT G INDEX AT CUSTOM FONT'". Thanks.


Solution

  • Use the AddFormattedText() method of the Paragraph class to mix several styles/fonts within a single paragraph.

    See also:
    http://pdfsharp.net/wiki/MigraDocFirstSteps.ashx
    http://pdfsharp.net/wiki/HelloMigraDoc-sample.ashx