ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.08k stars 237 forks source link

BulletList3 Not Displaying Correctly #381

Open richardparkinMAB opened 1 year ago

richardparkinMAB commented 1 year ago

We are in the process of updating our project to use PdfSharpCore (from PdfSharp) and noticed a potential issues with bullet point lists not displaying correctly.

We have created a pdf document that uses a bullet point list of type BulletList3. However when we view the pdf the bullet points are rendered as the section sign character (§) rather than a black square. Believe this is because the bullet point is using the Arial font rather than the Wingdings / Symbol font, which displays the section sign character as a black square.

NOTE: The bullet point text is using the correct font.

Expecting image

Reality image

image

image

Is this bug or can I change the font with a style?

richardparkinMAB commented 1 year ago

Looks like it's using the default font (which is indeed Arial).

Select symbol and font https://github.com/ststeiger/PdfSharpCore/blob/2d31ef51b9e931dee9a4d293c59f20399f8c7705/MigraDocCore.Rendering/MigraDoc.Rendering/ParagraphRenderer.cs#L1305

Default font https://github.com/ststeiger/PdfSharpCore/blob/2d31ef51b9e931dee9a4d293c59f20399f8c7705/PdfSharpCore/Utils/FontResolver.cs#L21

Render bullet point https://github.com/ststeiger/PdfSharpCore/blob/2d31ef51b9e931dee9a4d293c59f20399f8c7705/MigraDocCore.Rendering/MigraDoc.Rendering/ParagraphRenderer.cs#L1865