Java2D - Ability to add fonts via code and manual test harness. #450
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The manual tests can be run from:
openhtmltopdf-examples\src\main\java\com\openhtmltopdf\testcases\j2d\Java2DVisualTest.java
These tests are manual because Java2D rendering is not pixel identical across JREs, OSs, etc.
IF a test fails it will output an actual image, expected image and diff image at:
working-directory\target\test\visual-tests\test-output\j2d
. The working directory will usually be theopenhtmltopdf-examples
module directory. If not there, check the parent directory as well.From the diff image you will be able to work out if there is a bug in this library, or just a minor rendering difference by the JRE.
NOTE: Change to default behavior: Java2D will no longer pull in local machine fonts by default. To return to the previous behavior:
Otherwise, you should provide at least one font and use it on the body tag.
This change is to avoid differing behavior on development machine vs server.