I have dejavu fonts installed on x/y/z path and I am using open Jdk 8 (Zulu). While using application that runs on Apache I am getting fonts not found error. For your information, webpage application contain image as well.
add the path to your fonts to /etc/fonts/fonts.conf
:
<fontconfig>
<dir>x/y/z</dir>
Also, you may need to delete $HOME/.java/fonts/*