Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft-Hyphens visible when using custom font #549

Closed
StephanSchrader opened this issue Sep 8, 2020 · 1 comment
Closed

Soft-Hyphens visible when using custom font #549

StephanSchrader opened this issue Sep 8, 2020 · 1 comment

Comments

@StephanSchrader
Copy link

When using custom fonts with glyphs for soft-hyphens, the characters are rendered into the final PDF.

Steps to reproduce:

  1. open sandbox: https://sandbox.openhtmltopdf.com/
  2. insert following html code:
<!DOCTYPE html PUBLIC
 "-//OPENHTMLTOPDF//DOC XHTML Character Entities Only 1.0//EN" "">
<html>
<head>
<style>
@page {
  size: 450px 900px;
  margin: 0;
}
body {
  padding: 0;
  margin: 0;
  -fs-max-justification-inter-char: 1cm;
  -fs-max-justification-inter-word: 3cm;
}
table {
  border-collapse: collapse;
}
td, th {
  border: 1px solid black;
  padding: 0;
}
th {
  font-size: 10px;
  font-weight: normal;
}
</style>
</head>
<body>

<div style="font-family: 'cjk', 'deja-sans'; border: 1px solid black">
    <h2>No Hyphen Signs should be visible</h2>
    <p style="border: 1px solid gray">Haft&shy;pflicht&shy;ver&shy;si&shy;che&shy;rung</p>
    <p style="border: 1px solid gray">Hähn­chen­mast</p>
</div>

</body>
</html>
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Sep 8, 2020
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Sep 10, 2020
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Sep 16, 2020
- fix PdfBoxTextRenderer string width calculation
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Sep 17, 2020
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Oct 9, 2020
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Oct 12, 2020
StephanSchrader pushed a commit to StephanSchrader/openhtmltopdf that referenced this issue Oct 12, 2020
danfickle added a commit that referenced this issue Oct 14, 2020
@danfickle
Copy link
Owner

Thanks again @StephanSchrader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants