This entry will guide you on how to install and configure custom font in Repertoire 8.x and Repertoire 202x. In this exercise, we will be using Poppin font as an example.
1/ If you are using Repertoire 8.x, you will need to copy the Poppins fonts to your JRE path and configure the fonts path in config/EREngine-config.xml as follows, e.g.:
For Java 8:
<properties>
...
<property name="elixirtech.fonts.path" value="C:\\Program Files\\Java\\jdk1.8.0_412\\jre\\lib\\fonts\\fallback"/>
...
<properties>
For Java 11
<properties>
...
<property name="elixirtech.fonts.path" value="C:\\Program Files\\Java\\jdk-11.0.17\\lib\\fonts"/>
...
<properties>
1a/If you are using Repertoire 202x, copy the Poppins fonts to your JRE path and configure the fonts path in etc/application.conf as follows, e.g.:
For Java 17
elixir.rml {
fonts.path = "C:\\Program Files\\Java\\jdk-17\\conf\\fonts"
...
}
For Java 21
elixir.rml {
fonts.path = "C:\\Program Files\\Java\\jdk21.0.4_7\\conf\\fonts"
...
}
2/ In Repertoire 8.x add the font encodings to config/EREngine-config.xml as follows, e.g.:
<pdf-font-map>
...
<map-encoding logical-font-name="Poppins-Regular" encoding="Identity-H"/>
<map-encoding logical-font-name="Poppins-Italic" encoding="Identity-H"/>
<map-encoding logical-font-name="Poppins-SemiBold" encoding="Identity-H"/>
<map-encoding logical-font-name="Poppins-SemiBoldItalic" encoding="Identity-H"/>
</pdf-font-map>
2a/ In Repertoire 202x add the font encodings to etc/application.conf as follows, e.g.:
pdf {
font-map {
...
"Poppins-Regular" ="Identity-H"
"Poppins-Italic" ="Identity-H"
"Poppins-SemiBold" ="Identity-H"
"Poppins-SemiBoldItalic" ="Identity-H"
}
...
}
3/ Restart the Repertoire Designer if it was running before the changes were made, you should be able to access the fonts from the selector:
4/ If configured correctly the Poppins fonts will be embedded in the rendered PDF file:
Attached is the sample RML template used in this testing.
PoppinsTemplate.zip (1.7 KB)