danfickle / danfickle/openhtmltopdf

Tamil character using @font-face Noto-sans-tamil is not rendering properly

Open
#958 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

PDF:
image

ACTUAL DATA:
ஆண் குழந்தை தமிழ் பெயர்கள்

When i tried the copy the tamil text from the pdf and paste it somewhere else, it looks the same as the actual data. I believe this is a similar issue to #925 .

Font: [https://fonts.google.com/noto/specimen/Noto+Sans+Tamil](url)

CSS:
```
@font-face {
font-family: tamil;
font-weight: 500;
font-style: normal;
src: url('../../fonts/NotoSansTamil-Light.ttf');
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
```

Java code:
```
builder.withHtmlContent(htmlContent, ""); // Provide base URI if needed
builder.toStream(outputStream);
builder.run();

try (FileOutputStream fileOutputStream = new FileOutputStream(path)) {
fileOutputStream.write(outputStream.toByteArray());
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.