Closed redddcyclone closed 3 weeks ago
@redddcyclone we have a bunch of font integration tests passing in native. Can you decribe exactly what you are doing I don't see fonts/fontsfamily1723135526544.xml
inside jasperreports-fonts-7.0.1.jar
? Where are you seeing that file?
oh don't forget if you include your own font you need this line in your application.properties to pick it up.
quarkus.native.resources.includes=fonts/**
Our Integration Tests do that and they are passing native.
@melloware this file is inside a custom font extension I generated using JasperReports Studio (it generates a custom .jar file with any fonts you specify), as shown in this page: https://community.jaspersoft.com/knowledgebase/best-practices/custom-font-font-extension/
So it's a custom .jar file I add in my project through a custom local Maven repo (I inject the .jar in the repository and add to the project via pom.xml). The added fonts are inside the .jar file.
yep see above we have an Integration test doing this
and passing
@all-contributors add @redddcyclone for testing
@melloware
I've put up a pull request to add @redddcyclone! :tada:
I'm trying a new build with quarkus.native.resources.includes=fonts/**
. I'll report results soon
Thanks! let me know because I am using a custom Lobster font and DejaVu font and it creates this PDF with embedded fonts in Native mode: fonts.pdf
I submitted a PR to have the extension do this automatically since that is Jasper's recommended directory and examples.
@melloware thanks a lot, this setting fixed my problem! Now my custom font extension is working fine.
Now a bit off-topic, I'm getting problems generating a report with barcodes (using Barcode4J). I'm getting these errors:
10:56:46,634 SEVERE [org.primefaces.application.exceptionhandler.PrimeExceptionHandler] java.awt.Component.x: java.lang.NoSuchFieldError: java.awt.Component.x
10:58:46,153 SEVERE [org.primefaces.application.exceptionhandler.PrimeExceptionHandler] Could not initialize class org.apache.batik.bridge.CursorManager: java.lang.NoClassDefFoundError: Could not initialize class org.apache.batik.bridge.CursorManager
Should I open a new issue for this?
Ahh I have a Barcode4J native test as well: https://github.com/quarkiverse/quarkus-jasperreports/blob/main/integration-tests/src/main/java/io/quarkiverse/jasperreports/it/JasperReportsBarcode4JResource.java
Can you open a new ticket and try and reproduce it? My test is passing and prints out all Barcodes in a PDF.
@all-contributors add @redddcyclone for bug
@melloware
I've put up a pull request to add @redddcyclone! :tada:
Hello all,
I'm trying to generate a report in my native image application, but I use a custom font extension (I had to generate an Arial font extension because of problems with Arial bold). In dev mode it works fine but on native I get the following error:
Are custom font extensions not supported or must I do something I missed? The extension is a .jar file added to a local Maven repository. The missing file
fonts/fontsfamily1723135526544.xml
is inside this .jar.Thanks in advance!