JasperReports - specifying multiple fonts?

I need reports that support UTF8, and I need to be able to run CentOS, Windows, and Mac. This is especially difficult since the set of common UTF-8 fonts does not seem to exist.

In iReport, you can set one font through a drop-down list, and there seems to be no way to specify multiple fonts. Is there a way I can use a list of aryl fonts to try a given field? Or is there a better way to support working on multiple platforms?

+6
source share
2 answers

Usually the correct answer to cross-platform font issues is β€œusing font extensions,” and the Stefan link provides a solution.

In your case, the requirement of "CentOS, Windows, and Mac" is really a little red herring. Your real requirement seems to be "a free True Type font that covers all the characters you will use." If you had this, you could use font extensions on any platform, and life would be perfect.

MS Arial Unicode probably satisfies the requirements ... except that it is not free.

In fact, there is only one Arial font. It is owned by Monotype Imaging. There are subsets, families, and styles ... but they are all part of the same Arial. Therefore, I do not think that the phrase "list of aryal fonts" is strictly meaningful.

But you will probably be pleased with the set of N fonts that are all pretty similar to Arial for your needs, and between them they cover all the characters you need. Perhaps start with Liberation fonts, drop in UMing, a little of this, a bit of something ... Assuming you can find all the fonts you need ... you're still stuck. I'm sorry. You need to improve the function to show JasperReports a link to different physical fonts for one logical font, defined as a font extension. This actually happened in a different context (as indicated in the request), but I think it would ideally fit your needs. Please vote for him.

As long as this is available, sites like unifont have quite a few fonts. It may be good enough for your needs.

+1
source

JasperReports Font Documentation - This document describes how to pack fonts so you can use the same font on multiple platforms.

0
source

Source: https://habr.com/ru/post/897183/


All Articles