Skip to content

Trade Mark doesn't display properly in PDF #43

@patzhu6426

Description

@patzhu6426

The following code generates good SVG, but in the PDF the TM turns to 42.

        VectSharp.FontFamily.DefaultFontLibrary = new VectSharp.SimpleFontLibrary();
        Page page = new Page(612, 792);
        IEnumerable<FormattedText> formattedText = FormattedText.Format("This is normal MyTradeMark™ string", FontFamily.StandardFontFamilies.Helvetica, 20);
        page.Graphics.FillText(20, 20, formattedText, Colours.Black);

        formattedText = FormattedText.Format("This is bold MyTradeMark™ string", FontFamily.StandardFontFamilies.HelveticaBold, 20);
        page.Graphics.FillText(20, 50, formattedText, Colours.Black);

        formattedText = FormattedText.Format("This is oblique MyTradeMark™ string", FontFamily.StandardFontFamilies.HelveticaOblique, 20);
        page.Graphics.FillText(20, 80, formattedText, Colours.Black);

        formattedText = FormattedText.Format("This is oblique and bold MyTradeMark™ string", FontFamily.StandardFontFamilies.HelveticaBoldOblique, 20);
        page.Graphics.FillText(20, 110, formattedText, Colours.Black);

        page.SaveAsSVG(@"C:\\tmp\\fontStyles.svg");

        Document document = new Document();
        document.Pages.Add(page);
        document.SaveAsPDF(@"C:\\tmp\\fontStyles.pdf");

The SVG,
image

The PDF,
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions