Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Build] `testFontStyleOfStyledFont` causes builds to fail with default Maven configuration on OSX 13.0 and higher

Aperta
#1,158 7 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
testing

Direzione di ricerca

The failing test is openpdf/src/test/java/com/lowagie/text/pdf/fonts/FontTest.java, method testFontStyleOfStyledFont. Read that test and reproduce with mvn clean install on macOS 13 or later. The issue has had no comment for 686 days, so check the thread for any later resolution; done means the test handles a missing or unreadable Courier font without failing the build.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Describe the bug

On OS X Ventura (13.0) or later, the Courier font is missing its OS/2 table, probably due to licensing decisions made by Apple.

This causes the testFontStyleOfStyledFont test to fail:
https://github.com/LibrePDF/OpenPDF/blob/0a92bcc7ea9a41f919e093f774a3104865d92a42/openpdf/src/test/java/com/lowagie/text/pdf/fonts/FontTest.java#L81-L92

To Reproduce

Run mvn clean install on OSX 13.0 or newer. The build will fail due to an exception com.lowagie.text.DocumentException: Table 'OS/2' does not exist in /System/Library/Fonts/Courier.ttc in testFontStyleOfStyledFont.

Setting maven.test.failure.ignore to true allows you to build the project but, for obvious reasons, this is a bad workaround for anything other than trivial changes.

Expected behavior

It would be nice if this test failed gracefully if the font is not present or readable on the system.

System

(please complete the following information)

  • OS: [e.g. iOS] macOS 14.4.1
  • Used font: Courier
  • OpenPDF version: 2.0.2 (master branch - 0a92bcc7ea9a41f919e093f774a3104865d92a42)
  • Java version: openjdk 21.0.2

Your real name

Kurt Boberg

Lingua principale
Java
Stelle
4.4k
Fork
714
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LibrePDF/OpenPDF

Tutte le issue di LibrePDF/OpenPDF

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.