Skip to content

fugerit79/venus-sample-font-glyphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

venus-sample-font-glyphs

Venus Fugerit Doc sample, showing how to use different Fonts to handle glyphs. (for instance □ - □)

Keep a Changelog v1.1.0 badge Quality Gate Status Coverage License: MIT code of conduct

This project is part of a series of mini tutorial on Venus Fugerit Doc, here you can find the other tutorials.

Requirement

  • JDK 8+ (*)
  • Maven 3.8+

(*) Currently FOP not working on JDK 25, See bug JDK-8368356.

Project initialization

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.0

Glyph with different font

In 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

  1. Add the font configuration

to fop-config.xml

<font embed-url="classpath://font/FreeSerif.otf" embedding-mode="full">
   <font-triplet name="FreeSerif" style="normal" weight="normal"/>
</font>
  1. 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.

About

Venus Fugerit Doc sample using font with special Glyphs

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published