Add 'WOFF' file to my BIRT Report

Hi,

Im trying to use custom fonts defined in WOFF file in my BIRT report, Can you please help here how can I able to use in my reports? Im using BIRT Runtime 4.8.0.

Thanks,

Kiran

Answers

  • juanweiss
    edited August 14 #2

    Register the Custom Font: Before initializing the BIRT engine, register your custom font using the following line of code:

    FontFactory.register("/path/to/your/custom-font.ttf");

    Review and use carefully. More info on FAQ.Replace /path/to/your/custom-font.ttf with the actual path to your WOFF font file. This step ensures that BIRT recognizes and embeds the font in your PDF reports.

  • Alfred Walters
    edited August 14 #3

    I'm creating a Java application that leverages BIRT to generate reports. I want to bundle custom fonts in a jar file so that they may be embedded in PDF reports.

    I could export fonts to the file system first and then point BIRT to their locations, but I'm curious if it's possible to enable BIRT to load fonts straight from the classpath.

  • Hi Kiran,

    To use custom fonts from a WOFF file in BIRT 4.8.0, follow these steps:

    1. Convert the WOFF file to a TTF file since BIRT supports TTF fonts.
    2. Place the TTF file in the BIRT Fonts folder (birt-runtime/fonts).
    3. Update your report design by specifying the font in the "Font" properties.

    After these steps, the custom font should be available in your reports.