[#13091] - Custom fonts are every time embedded

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

I create a custom font jar with JasperStudio. I set pdfEmbedded to false.
Secondly, I create a jasperreports.properties file and here I set net.sf.jasperreports.default.pdf.embedded=false.
The bug is now that the pdf contains the font and the file size is to big for us.

jasperreports.properties
net.sf.jasperreports.default.font.name=Noto Sans CJK SC
net.sf.jasperreports.default.font.size=10
net.sf.jasperreports.default.pdf.encoding=Identity-H
net.sf.jasperreports.default.pdf.embedded=false
net.sf.jasperreports.default.pdf.font.name=Noto Sans CJK SC

And from the custom jar file
<?xml version="1.0" encoding="UTF-8"?>
<fontFamilies>
<fontFamily name="Noto Sans CJK SC">
<normal><![CDATA[fonts/NotoSansCJKSC/NotoSansCJKsc-Regular.ttf]]></normal>
<bold><![CDATA[fonts/NotoSansCJKSC/NotoSansCJKsc-Bold.ttf]]></bold>
<pdfEmbedded><![CDATA[false]]></pdfEmbedded>
<exportFonts/>
</fontFamily>
</fontFamilies>

AttachmentSize
Binary Data jasperreports.properties506 bytes
v6.11
JRPdfExporter
uwe.ttc-s's picture
Joined: Jan 9 2020 - 11:44pm
Last seen: 3 months 4 weeks ago

1 Comment:

#1

I believe U found the reason here https://github.com/LibrePDF/OpenPDF/blob/master/openpdf/src/main/java/co... in line 822

if (isBuiltinFonts14 || isCJKFont) {
embedded = false;
} else if (encoding.equals(IDENTITY_H) || encoding.equals(IDENTITY_V)) {
embedded = true;
}

Why all fonts with encoding IDENTITY_H are getting embedded?

Feedback
randomness