JasperReports - 指定多种字体?

发布于 2024-12-04 03:21:52 字数 175 浏览 1 评论 0原文

我需要支持 UTF8 的报告,并且需要能够在 CentOS、Windows 和 Mac 上运行。这特别棘手,因为共享 UTF-8 字体集似乎不存在。

在iReport中,可以通过下拉框设置单一字体,似乎没有办法指定多种字体。有什么方法可以使用 arial 字体列表来尝试给定的字段吗?或者有没有更好的方式支持多平台运行?

I need UTF8-capable reports, and I need to be able to run on CentOS, Windows, and Mac. This is particularly tricky, as the set of shared UTF-8 fonts seems to be non-existent.

In iReport, you can set a single font via a drop-down box, and there doesn't seem to be a way to specify multiple fonts. Is there any way I can use a list of arial fonts to try for a given field? Or is there a better way to support running on multiple platforms?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别想她 2024-12-11 03:21:52

通常跨平台字体问题的正确答案是“使用字体扩展”,Stefan 的链接提供了解决方案。

就您而言,对“CentOS、Windows 和 Mac”的要求确实有点转移注意力。您真正的要求似乎是“一种免费的 True Type 字体,涵盖您将使用的所有字符”。如果你有这个,你就可以在任何平台上使用字体扩展,生活将是完美的。

MS Arial Unicode 可能会满足要求......但它不是免费的。

实际上只有一种 Arial 字体。它属于 Monotype Imaging 所有。有子集、家族和风格……但它们都是同一个 Arial 的一部分。所以我不认为“arial 字体列表”这个短语有严格的意义。

但您可能会对一组 N 种字体感到满意,这些字体都与 Arial 非常相似,可以满足您的需求,并且它们涵盖了您需要的所有字符。也许从 Liberation Fonts 开始,加入 UMing,一点这个,一点那个......假设你可以找到你需要的所有字体......你仍然被困住。对不起。您需要这个功能增强才能告诉 JasperReports将不同的物理字体链接到定义为字体扩展的一种逻辑字体。它实际上是在不同的上下文中出现的(如请求中所示),但我认为它会完全满足您的需求。请投票赞成。

在此之前,像 unifont 这样的网站有相当多的可用字体。也许其中一个足以满足您的需求。

Normally the correct answer to cross-platform font problems is "use font extensions", and Stefan's link provides the solution.

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

MS Arial Unicode would probably meet the requirement... except that it's not free.

There's really only one Arial font. It's owned by Monotype Imaging. There are subsets and families and styles... but they are all part of the one Arial. So I don't think the phrase "a list of arial fonts" is strictly meaningful.

But you would probably be happy with a set of N fonts that are all sufficiently similar to Arial for your needs, and between them they cover all of the characters you need. Maybe start with Liberation Fonts, throw in UMing, a little of this, a little of that... Assuming you can find all the fonts you need... you're still stuck. Sorry. You need this feature enhancement to have a way to tell JasperReports to link different physical fonts to one logical font defined as a font extension. It actually came up in a different context (as indicated in the request), but I think it would perfectly meet your needs. Please vote it up.

Until that's available, sites like unifont have quite a few fonts available. Maybe one is good enough for your needs.

無處可尋 2024-12-11 03:21:52

JasperReports 字体文档
- 本文档介绍了如何打包字体,以便您可以在多个平台上使用相同的字体。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文