Venus Fugerit Doc sample, showing how to use different Fonts to handle glyphs. (for instance □ - □)
This project is part of a series of mini tutorial on Venus Fugerit Doc, here you can find the other tutorials.
- JDK 8+ (*)
- Maven 3.8+
(*) Currently FOP not working on JDK 25, See bug JDK-8368356.
This project was created with Venus Maven plugin
mvn org.fugerit.java:fj-doc-maven-plugin:8.17.7:init \
-DgroupId=org.fugerit.java.demo \
-DartifactId=venus-sample-font-glyphs \
-Dextensions=base,freemarker,mod-fop \
-DaddJacoco=true \
-DwithCI=GitHub \
-DaddFormatting=true \
-DprojectVersion=1.0.0In the document we are using a Glyph (□) not supported by our font (TitilliumWeb).
Let's say we find a font supporting the glyph, but we want to use it only for that specific symbol.
We need to
- Add the font configuration
<font embed-url="classpath://font/FreeSerif.otf" embedding-mode="full">
<font-triplet name="FreeSerif" style="normal" weight="normal"/>
</font>- Use the new font for the specific symbol :
<phrase>Sample glyph</phrase><phrase font-name="FreeSerif">□</phrase><phrase>with free serif font</phrase>In the template.