Skip to content

Fix Font constructor compatibility with Majorsilence.Drawing wrapper#248

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-ean-barcode-quality-issues
Draft

Fix Font constructor compatibility with Majorsilence.Drawing wrapper#248
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-ean-barcode-quality-issues

Conversation

Copy link
Contributor

Copilot AI commented Oct 19, 2025

The EAN-13 barcode improvements introduced a Font constructor call incompatible with the Majorsilence.Drawing.Font wrapper used in DRAWINGCOMPAT builds.

Changes

  • RdlCri/BarCodeEAN13.cs: Removed GraphicsUnit.Pixel parameter from Font constructor

The Majorsilence.Drawing.Font wrapper (SkiaSharp-based) only provides:

  • Font(string familyName, float size)
  • Font(string familyName, float size, FontStyle style)

Unlike System.Drawing.Font, it lacks the GraphicsUnit overload. Since fontHeightPixels is already in pixel units, the unit specification was redundant.

- using var f = new Draw2.Font("Arial", fontHeightPixels, Draw2.GraphicsUnit.Pixel);
+ using var f = new Draw2.Font("Arial", fontHeightPixels);
Original prompt

This section details on the original issue you should resolve

<issue_title>Bar code EAN quality</issue_title>
<issue_description>We are trying to use the ean 13 bar code but we observed some issue.
First of all, the numbers are unreadale, but when print on pdf there's no issue.
The bar code seem correct but the bar code reader has some trouble to read. The bars look well defined .
We add some other text to show that there is not any printer quality issue.

Images attached ( acquired with scanner) .
barcodesmall
barcodesmall2

</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #182


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ability

Co-authored-by: majorsilence <656288+majorsilence@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issues with EAN 13 barcode readability Fix EAN-13 barcode rendering quality for better scanning and readability Oct 19, 2025
Copilot AI requested a review from majorsilence October 19, 2025 19:52
Co-authored-by: majorsilence <656288+majorsilence@users.noreply.github.com>
Copilot AI changed the title Fix EAN-13 barcode rendering quality for better scanning and readability Fix Font constructor compatibility with Majorsilence.Drawing wrapper Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bar code EAN quality

2 participants