jasperreport生成pdf_jasperreport 导出excel_jasperreport json(41)

电脑杂谈  发布时间:2017-02-04 10:28:36  来源:网络整理

same name that are present in the report font declaration referenced using the reportFont attribute.

The JasperReports Ultimate Guide

Page 51

For example, if we have a report font like the following:

<reportFont

name="Arial_Normal"

isDefault="true"

fontName="Arial"

size="8"

pdfFontName="Helvetica"

pdfEncoding="Cp1252"

isPdfEmbedded="false"/>

and we want to create a text field that has basically the same font settings like those in this report font,

but only a greater size, the only thing we should do is to reference this report font using the

reportFont attribute and specify the desired font size like this:

<textElement>

<font reportFont="Arial_Normal" size="14"/>

</textElement>

When the reportFont attribute is missing, the default report font is used as base font.

Font Name

In Java, there are two types of fonts: physical fonts and logical fonts. Physical fonts are the actual font

libraries consisting of, for example, TrueType or PostScript Type 1 fonts. The physical fonts may be

Arial, Time, Helvetica, Courier, or any number of other fonts, including international fonts.

Logical fonts are the five font types that have been recognized by the Java platform since version 1.0:

Serif, Sans-serif, Monospaced, Dialog, and DialogInput. These logical fonts are not actual font libraries

that are installed anywhere on your system. They are merely font-type names recognized by the Java

runtime, which must be mapped to some physical font that is installed on your system.


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-41.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 丛利鹏
      丛利鹏

      岀名后说话更应慎重才是

    热点图片
    拼命载入中...