Skip to content

add Windows and macOS to build matrix, fix cross-platform issues#1547

Draft
sreeya12 wants to merge 1 commit intoLibrePDF:masterfrom
sreeya12:fix-macos-font
Draft

add Windows and macOS to build matrix, fix cross-platform issues#1547
sreeya12 wants to merge 1 commit intoLibrePDF:masterfrom
sreeya12:fix-macos-font

Conversation

@sreeya12
Copy link
Copy Markdown

@sreeya12 sreeya12 commented May 5, 2026

What is the purpose of this PR

Add Windows and macOS to the CI build matrix. Currently the workflow only runs on Ubuntu.

Expected results

Build and tests pass on all three operating systems (Ubuntu, Windows, macOS).

Actual results

Running the workflow on Windows and macOS without fixes produces the following errors:

Windows: The debug step uses pwd && ls -l. On Windows, ls maps to PowerShell's Get-ChildItem, and -l is interpreted as -LiteralPath, which requires an argument.

macOS: FontTest.testFontStyleOfStyledFont loads Courier.ttc and expects an OS/2 TrueType table. On macOS, the bundled Courier font does not include that table. This is a platform-specific font difference, not a code defect.

Description of fix

  1. Added OS build matrix (ubuntu-latest, windows-latest, macos-latest).
  2. Added shell: bash to the debug step so it runs correctly on Windows.
  3. Added Assumptions.assumeFalse to skip testFontStyleOfStyledFont on macOS where the required font table is unavailable. An alternative approach would be to comment out or remove the FontFactory.registerDirectories() call.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 5, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sreeya12 sreeya12 force-pushed the fix-macos-font branch 4 times, most recently from ad702ad to e2b9fdd Compare May 6, 2026 16:01
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 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.

1 participant