In order to add a custom font to Lucee (version 5.0/5.1), you need to create a file called fonts.jar.
The fonts.jar file is essentially a zip file containing a specific files structure as below:
It is quite important that the fonts/ directory exists in this archive file, and that the files reside within it.
The pd4fonts.properties is a file specifying the name(as used by Lucee) of the font and the file which it is associated with.
Our pd4fonts.properties file contains this one line:
If you need to load more fonts, you can add them all into this same jar file, listing each of the fonts on a new line within the
Note: If your font name contains spaces, they need to escaped in the pd4fonts.properties file:
Times\ New\ Roman.ttf
Once the jar file has been created, copy it into the Lucee lib directory, in this case it would be:
Make sure the file has the same permissions as the existing
lucee-xxx.jar file in the same location.
Restart the Lucee service to load the new fonts file.