In this article you will learn how to add custom font in ireport as jasper reports font extension. Here custom font means the font style or font family that is not exists in ireport tools or properties.
To achieve font style in pdf we need to add desired font style manually. For example if we want to show Monotype Corsiva in our jasper report then we need to first download .ttf file named Monotype Corsiva. Here ttf is the extension of our custom font style or font family, ttf stands for True Type Font.
Installing a new font
1- Click on Tools and select Options2- Click on Fonts tab and Install Font
3- Now click on Browse and select your font path with ttf extension (If you don't have this file please download it first, by google search "download Monotype Corsiva") and click on Next button.
4- Please check this Embed this font in the PDF Document if you want to embed this font in the pdf document and click Next and after that click Ok.
5- If you face below error Access is Denied than run your ireport designer as an administrator and follow above steps again.
Now that we have installed custom font, now we export a font as a jasper Report extension.
Exporting a font as a JasperReport extension
1- Follow step number 1 and 2
2- Select your desired font and click on Export as Extension button.
3- Choose your path and name your font extension, remember your font name should be without space and must have .jar file extension. In my case font name would be MonotypeCorsivaCustom.jar.
4- Click on Save and than OK.
0 Comments