True Type Fonts
Users might find that well designed reports in Logi JReport Designer become truncated when running in Logi JReport Server on a different platform. The reason is that various platforms use different font systems, and by mapping the fonts to a different platform by JDK, the report result is shown with a discrepancy. To solve this problem, Java provides a True Type Font (TTF) administrative system, which allows the fonts to be published together with a report into the runtime environment independent of the platform fonts.
In addition, in cases where end users do not have the fonts used in a report, Logi JReport provides a PDF embedded fonts solution. That is, the fonts are embedded in the PDF file, and end users do not need to install the fonts to their local machines.
Notes:
- When you design reports that will be run on a platform different to where they have been designed, it is best to use TTF fonts.
- Logi JReport uses the JDK TTF, however the JDK has a problem in printing reports with rs_song.ttf (some characters are incorrect). You are therefore recommended to use other Chinese TTF fonts such as SimSun.ttf, PMingLiu.ttf and LF_FangSong.ttf.
The following sections describe how to use TTF in your reports:
- Designing Reports with TTF
- Publishing TTF to the Production Environment
- Delivering the Result in Excel/RTF/HTML/TXT
- Delivering the Result in PDF
- Applying Bold and Italic Properties to TTF
Designing Reports with TTF
To design reports with TTF, follow the steps below:
- Copy True Type Font files *.ttf to the
<install_root>\font
subdirectory. You can find the TTF fonts in your system's Font directory or from the Internet. - Running Logi JReport Designer. In the design area, select on the drop-down arrow of the font list on the toolbar, and scroll down to the bottom part of the list. You will then find the fonts with an * before their name. These are the TTF fonts you have published.
- Preview the report result and save the report until you are satisfied with the report design.
Publishing TTF to the Production Environment
If you want to publish report files that use True Type Fonts to other operating systems, you will need to place the relevant font files (other files in the font path) in the <install_root>\font
directory of the operating system of where you want to publish the report. Make sure that you copy or ftp (in binary mode) the .ttf files to the directory.
Delivering the Result in Excel/RTF/HTML/TXT
For files of HTML/RTF/Excel formats, they will find the fonts from the system font directory. If you want to deliver the report result in the above formats to end users, you should choose the TTF fonts that are commonly used on Windows systems for your reports. If you have to use fonts that do not exist in a client system, you can choose the embedded TTF font solution for a good print result in PDF format.
Delivering the Result in PDF
To view PDF reports with other character sets, for example, Chinese fonts, you will need to install special language packages. Also, if you design reports with fonts that are not within Acrobat's internal fonts, they will be mapped differently. The above two cases will cause trouble to end users when viewing or printing a report with Acrobat Reader. However, differing from HTML and RTF, PDF allows the embedding of the font description within a file. Logi JReport therefore provides the embedded TTF font solution for a PDF result. You will find it extremely helpful in the following cases:
- When you select TTF fonts to design a report, and these fonts are not within the client's existing font systems.
- When you have used the TTF and Acrobat Reader has to be updated with the language extension package to view the result, but you do not want to trouble the end user with it.
To take advantage of the PDF embedded TTF font feature, follow the steps below:
- Select the TTF to design reports as specified previously.
- Open the report, go to the Report Inspector, and in the node representing the report, find a property called Embedded Fonts. The drop-down list will show all the TTF fonts used by the report. You can select multiple fonts by holding down the Ctrl or Shift key.
- Save the report and export it to a PDF file. The selected fonts will be embedded in the exported PDF file.
By embedding TTF fonts, the file size will increase a little. However, it is still of reasonable size to be transferred over a network.
Applying Bold and Italic Properties to TTF
Logi JReport supports the Bold and Italic properties when you design report with TTF. When you select a TTF font and set the Bold/Italic property to true, Logi JReport will first automatically search the <install_root>\font
directory to check all the TTF files related with the TTF font you have selected previously. If there is such a TTF file holding the Bold/Italic property, Logi JReport will use the font style defined in this file to match your setting and make the Bold/Italic function take effect; if not, Logi JReport will find the specified font in your platform fonts and apply the Bold/Italic function directly.
Moreover, when you select an embedded font while using TTF to design reports, and set the Bold/Italic property to true, if Logi JReport find the related TTF file to match your setting, the matched font with the Bold/Italic property will be embedded when you want to export the report result to a PDF file.